// 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> = { brandCheck: "brand_check", bundleMethod: "bundle_method", certPackUuid: "cert_pack_uuid", certificateAuthority: "certificate_authority", certificateStatus: "certificate_status", cloudflareBranding: "cloudflare_branding", cnameTarget: "cname_target", dcvDelegationRecords: "dcv_delegation_records", expiresOn: "expires_on", geoRestrictions: "geo_restrictions", httpBody: "http_body", httpUrl: "http_url", modifiedOn: "modified_on", perPage: "per_page", primaryCertificate: "primary_certificate", recordName: "record_name", recordTarget: "record_target", resultInfo: "result_info", totalCount: "total_count", txtName: "txt_name", txtValue: "txt_value", uploadedOn: "uploaded_on", validationErrors: "validation_errors", validationMethod: "validation_method", validationRecords: "validation_records", validityDays: "validity_days", verificationInfo: "verification_info", verificationStatus: "verification_status", verificationType: "verification_type", zoneId: "zone_id", }; export class AdvancedCertificateManagerRequired extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "AdvancedCertificateManagerRequired", { code: S.Number, message: S.String, }, ), [{ code: 1450 }], ) {} export class CertificatePackNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "CertificatePackNotFound", { code: S.Number, message: S.String, }, ), [{ code: 1408 }, { status: 404 }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export type AnalyzeCreateRequestBundleMethod = | "ubiquitous" | "optimal" | "force"; export const AnalyzeCreateRequestBundleMethod = /*@__PURE__*/ S.String; export interface CreateAnalyzeRequest { /** Identifier. */ zoneId: string; /** A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. */ bundleMethod?: AnalyzeCreateRequestBundleMethod | (string & {}); /** The zone's SSL certificate or certificate and the intermediate(s). */ certificate?: string; } export const CreateAnalyzeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), bundleMethod: S.optional( AnalyzeCreateRequestBundleMethod.pipe(T.Body("bundle_method")), ), certificate: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/ssl/analyze", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAnalyzeRequest", }) as any as S.Schema; export type CreateAnalyzeResponse = unknown; export const CreateAnalyzeResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAnalyzeResponse", }) as any as S.Schema; export type CertificatePacksCreateRequestCertificateAuthority = | "google" | "lets_encrypt" | "ssl_com"; export const CertificatePacksCreateRequestCertificateAuthority = /*@__PURE__*/ S.String; export type CertificatePacksCreateRequestHostsList = Array; export const CertificatePacksCreateRequestHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksCreateRequestType = "advanced"; export const CertificatePacksCreateRequestType = /*@__PURE__*/ S.String; export type CertificatePacksCreateRequestValidationMethod = | "txt" | "http" | "email"; export const CertificatePacksCreateRequestValidationMethod = /*@__PURE__*/ S.String; export type CertificatePacksCreateRequestValidityDays = 14 | 30 | 90 | 365; export const CertificatePacksCreateRequestValidityDays = /*@__PURE__*/ S.Number; export interface CreateCertificatePackRequest { /** Identifier. */ zoneId: string; /** Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities). */ certificateAuthority: | CertificatePacksCreateRequestCertificateAuthority | (string & {}); /** Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. */ hosts: CertificatePacksCreateRequestHostsList; /** Type of certificate pack. */ type: CertificatePacksCreateRequestType | (string & {}); /** Validation Method selected for the order. */ validationMethod: | CertificatePacksCreateRequestValidationMethod | (string & {}); /** Validity Days selected for the order. */ validityDays: CertificatePacksCreateRequestValidityDays | (number & {}); /** Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. */ cloudflareBranding?: boolean; } export const CreateCertificatePackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateAuthority: CertificatePacksCreateRequestCertificateAuthority.pipe( T.Body("certificate_authority"), ), hosts: CertificatePacksCreateRequestHostsList, type: CertificatePacksCreateRequestType, validationMethod: CertificatePacksCreateRequestValidationMethod.pipe( T.Body("validation_method"), ), validityDays: CertificatePacksCreateRequestValidityDays.pipe( T.Body("validity_days"), ), cloudflareBranding: S.optional( S.Boolean.pipe(T.Body("cloudflare_branding")), ), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/ssl/certificate_packs/order", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCertificatePackRequest", }) as any as S.Schema; export type CertificatePacksCreateResponseCertificatesItemHostsList = Array; export const CertificatePacksCreateResponseCertificatesItemHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksCreateResponseCertificatesItemGeoRestrictionsLabel = | "us" | "eu" | "highest_security"; export const CertificatePacksCreateResponseCertificatesItemGeoRestrictionsLabel = /*@__PURE__*/ S.String; export interface CertificatePacksCreateResponseCertificatesItemGeoRestrictions { label?: CertificatePacksCreateResponseCertificatesItemGeoRestrictionsLabel | null; } export const CertificatePacksCreateResponseCertificatesItemGeoRestrictions = /*@__PURE__*/ S.suspend(() => S.Struct({ label: S.optional( S.NullOr( CertificatePacksCreateResponseCertificatesItemGeoRestrictionsLabel, ), ), }), ).annotate({ identifier: "CertificatePacksCreateResponseCertificatesItemGeoRestrictions", }) as any as S.Schema; export interface CertificatePacksCreateResponseCertificatesItem { /** Certificate identifier. */ id: string; /** Hostnames covered by this certificate. */ hosts: CertificatePacksCreateResponseCertificatesItemHostsList; /** Certificate status. */ status: string; /** Certificate bundle method. */ bundleMethod?: string | null; /** When the certificate from the authority expires. */ expiresOn?: string | null; /** Specify the region where your private key can be held locally. */ geoRestrictions?: CertificatePacksCreateResponseCertificatesItemGeoRestrictions | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** When the certificate was last modified. */ modifiedOn?: string | null; /** The order/priority in which the certificate will be used. */ priority?: number | null; /** The type of hash used for the certificate. */ signature?: string | null; /** When the certificate was uploaded to Cloudflare. */ uploadedOn?: string | null; /** Identifier. */ zoneId?: string | null; } export const CertificatePacksCreateResponseCertificatesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, hosts: CertificatePacksCreateResponseCertificatesItemHostsList, status: S.String, bundleMethod: S.optional( S.NullOr(S.String).pipe(T.Body("bundle_method")), ), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), geoRestrictions: S.optional( S.NullOr( CertificatePacksCreateResponseCertificatesItemGeoRestrictions, ).pipe(T.Body("geo_restrictions")), ), issuer: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), priority: S.optional(S.NullOr(S.Number)), signature: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), zoneId: S.optional(S.NullOr(S.String).pipe(T.Body("zone_id"))), }), ).annotate({ identifier: "CertificatePacksCreateResponseCertificatesItem", }) as any as S.Schema; export type CertificatePacksCreateResponseCertificatesList = Array; export const CertificatePacksCreateResponseCertificatesList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseCertificatesItem, ) as any as S.Schema; export type CertificatePacksCreateResponseHostsList = Array; export const CertificatePacksCreateResponseHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksCreateResponseStatus = | "initializing" | "pending_validation" | "deleted" | "pending_issuance" | "pending_deployment" | "pending_deletion" | "pending_expiration" | "expired" | "active" | "initializing_timed_out" | "validation_timed_out" | "issuance_timed_out" | "deployment_timed_out" | "deletion_timed_out" | "pending_cleanup" | "staging_deployment" | "staging_active" | "deactivating" | "inactive" | "backup_issued" | "holding_deployment"; export const CertificatePacksCreateResponseStatus = /*@__PURE__*/ S.String; export type CertificatePacksCreateResponseType = | "mh_custom" | "managed_hostname" | "sni_custom" | "universal" | "advanced" | "total_tls" | "keyless" | "legacy_custom"; export const CertificatePacksCreateResponseType = /*@__PURE__*/ S.String; export type CertificatePacksCreateResponseCertificateAuthority = | "google" | "lets_encrypt" | "ssl_com"; export const CertificatePacksCreateResponseCertificateAuthority = /*@__PURE__*/ S.String; export type CertificatePacksCreateResponseDcvDelegationRecordsItemEmailsList = Array; export const CertificatePacksCreateResponseDcvDelegationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksCreateResponseDcvDelegationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksCreateResponseDcvDelegationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksCreateResponseDcvDelegationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr( CertificatePacksCreateResponseDcvDelegationRecordsItemEmailsList, ), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksCreateResponseDcvDelegationRecordsItem", }) as any as S.Schema; export type CertificatePacksCreateResponseDcvDelegationRecordsList = Array; export const CertificatePacksCreateResponseDcvDelegationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseDcvDelegationRecordsItem, ) as any as S.Schema; export interface CertificatePacksCreateResponseValidationErrorsItem { /** A domain validation error. */ message?: string | null; } export const CertificatePacksCreateResponseValidationErrorsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ message: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CertificatePacksCreateResponseValidationErrorsItem", }) as any as S.Schema; export type CertificatePacksCreateResponseValidationErrorsList = Array; export const CertificatePacksCreateResponseValidationErrorsList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseValidationErrorsItem, ) as any as S.Schema; export type CertificatePacksCreateResponseValidationMethod = | "txt" | "http" | "email"; export const CertificatePacksCreateResponseValidationMethod = /*@__PURE__*/ S.String; export type CertificatePacksCreateResponseValidationRecordsItemEmailsList = Array; export const CertificatePacksCreateResponseValidationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksCreateResponseValidationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksCreateResponseValidationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksCreateResponseValidationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr(CertificatePacksCreateResponseValidationRecordsItemEmailsList), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksCreateResponseValidationRecordsItem", }) as any as S.Schema; export type CertificatePacksCreateResponseValidationRecordsList = Array; export const CertificatePacksCreateResponseValidationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseValidationRecordsItem, ) as any as S.Schema; export type CertificatePacksCreateResponseValidityDays = 14 | 30 | 90 | 365; export const CertificatePacksCreateResponseValidityDays = /*@__PURE__*/ S.Number; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateCertificatePackResponse { /** Identifier. */ id: string; /** Array of certificates in this pack. */ certificates: CertificatePacksCreateResponseCertificatesList; /** Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. */ hosts: CertificatePacksCreateResponseHostsList; /** Status of certificate pack. */ status: CertificatePacksCreateResponseStatus; /** Type of certificate pack. */ type: CertificatePacksCreateResponseType; /** Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities). */ certificateAuthority?: CertificatePacksCreateResponseCertificateAuthority | null; /** Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. */ cloudflareBranding?: boolean | null; /** DCV Delegation records for domain validation. */ dcvDelegationRecords?: CertificatePacksCreateResponseDcvDelegationRecordsList | null; /** Identifier of the primary certificate in a pack. */ primaryCertificate?: string | null; /** Domain validation errors that have been received by the certificate authority (CA). */ validationErrors?: CertificatePacksCreateResponseValidationErrorsList | null; /** Validation Method selected for the order. */ validationMethod?: CertificatePacksCreateResponseValidationMethod | null; /** Certificates' validation records. */ validationRecords?: CertificatePacksCreateResponseValidationRecordsList | null; /** Validity Days selected for the order. */ validityDays?: CertificatePacksCreateResponseValidityDays | null; } export const CreateCertificatePackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, certificates: CertificatePacksCreateResponseCertificatesList, hosts: CertificatePacksCreateResponseHostsList, status: CertificatePacksCreateResponseStatus, type: CertificatePacksCreateResponseType, certificateAuthority: S.optional( S.NullOr(CertificatePacksCreateResponseCertificateAuthority).pipe( T.Body("certificate_authority"), ), ), cloudflareBranding: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_branding")), ), dcvDelegationRecords: S.optional( S.NullOr(CertificatePacksCreateResponseDcvDelegationRecordsList).pipe( T.Body("dcv_delegation_records"), ), ), primaryCertificate: S.optional( S.NullOr(S.String).pipe(T.Body("primary_certificate")), ), validationErrors: S.optional( S.NullOr(CertificatePacksCreateResponseValidationErrorsList).pipe( T.Body("validation_errors"), ), ), validationMethod: S.optional( S.NullOr(CertificatePacksCreateResponseValidationMethod).pipe( T.Body("validation_method"), ), ), validationRecords: S.optional( S.NullOr(CertificatePacksCreateResponseValidationRecordsList).pipe( T.Body("validation_records"), ), ), validityDays: S.optional( S.NullOr(CertificatePacksCreateResponseValidityDays).pipe( T.Body("validity_days"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCertificatePackResponse", }) as any as S.Schema; export interface DeleteCertificatePackRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificatePackId: string; } export const DeleteCertificatePackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificatePackId: S.String.pipe(T.Label("certificate_pack_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCertificatePackRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteCertificatePackResponse { /** Identifier. */ id?: string | null; } export const DeleteCertificatePackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCertificatePackResponse", }) as any as S.Schema; export interface GetAutomaticUpgraderRequest { zoneId: string; } export const GetAutomaticUpgraderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/ssl_automatic_mode", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAutomaticUpgraderRequest", }) as any as S.Schema; export type GetAutomaticUpgraderResponseValue = "auto" | "custom"; export const GetAutomaticUpgraderResponseValue = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAutomaticUpgraderResponse { id: string; /** Whether this setting can be updated or not. */ editable: boolean; /** Last time this setting was modified. */ modifiedOn: string; /** Current setting of the automatic SSL/TLS. */ value: GetAutomaticUpgraderResponseValue; /** Next time this zone will be scanned by the Automatic SSL/TLS. */ nextScheduledScan?: string | null; } export const GetAutomaticUpgraderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, editable: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), value: GetAutomaticUpgraderResponseValue, nextScheduledScan: S.optional( S.NullOr(S.String).pipe(T.Body("next_scheduled_scan")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAutomaticUpgraderResponse", }) as any as S.Schema; export interface GetAutoOriginTlsKexRequest { zoneId: string; } export const GetAutoOriginTlsKexRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/auto_origin_tls_kex", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAutoOriginTlsKexRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAutoOriginTlsKexResponse { id: string; /** Whether Auto-Origin TLS KEX selection is enabled for the zone. */ enabled: boolean; /** Last time this setting was modified. */ modifiedOn: string; } export const GetAutoOriginTlsKexResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, enabled: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAutoOriginTlsKexResponse", }) as any as S.Schema; export interface GetCertificatePackRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificatePackId: string; } export const GetCertificatePackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificatePackId: S.String.pipe(T.Label("certificate_pack_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCertificatePackRequest", }) as any as S.Schema; export type CertificatePacksGetResponseCertificatesItemHostsList = Array; export const CertificatePacksGetResponseCertificatesItemHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksGetResponseCertificatesItemGeoRestrictionsLabel = | "us" | "eu" | "highest_security"; export const CertificatePacksGetResponseCertificatesItemGeoRestrictionsLabel = /*@__PURE__*/ S.String; export interface CertificatePacksGetResponseCertificatesItemGeoRestrictions { label?: CertificatePacksGetResponseCertificatesItemGeoRestrictionsLabel | null; } export const CertificatePacksGetResponseCertificatesItemGeoRestrictions = /*@__PURE__*/ S.suspend(() => S.Struct({ label: S.optional( S.NullOr( CertificatePacksGetResponseCertificatesItemGeoRestrictionsLabel, ), ), }), ).annotate({ identifier: "CertificatePacksGetResponseCertificatesItemGeoRestrictions", }) as any as S.Schema; export interface CertificatePacksGetResponseCertificatesItem { /** Certificate identifier. */ id: string; /** Hostnames covered by this certificate. */ hosts: CertificatePacksGetResponseCertificatesItemHostsList; /** Certificate status. */ status: string; /** Certificate bundle method. */ bundleMethod?: string | null; /** When the certificate from the authority expires. */ expiresOn?: string | null; /** Specify the region where your private key can be held locally. */ geoRestrictions?: CertificatePacksGetResponseCertificatesItemGeoRestrictions | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** When the certificate was last modified. */ modifiedOn?: string | null; /** The order/priority in which the certificate will be used. */ priority?: number | null; /** The type of hash used for the certificate. */ signature?: string | null; /** When the certificate was uploaded to Cloudflare. */ uploadedOn?: string | null; /** Identifier. */ zoneId?: string | null; } export const CertificatePacksGetResponseCertificatesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, hosts: CertificatePacksGetResponseCertificatesItemHostsList, status: S.String, bundleMethod: S.optional( S.NullOr(S.String).pipe(T.Body("bundle_method")), ), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), geoRestrictions: S.optional( S.NullOr( CertificatePacksGetResponseCertificatesItemGeoRestrictions, ).pipe(T.Body("geo_restrictions")), ), issuer: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), priority: S.optional(S.NullOr(S.Number)), signature: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), zoneId: S.optional(S.NullOr(S.String).pipe(T.Body("zone_id"))), }), ).annotate({ identifier: "CertificatePacksGetResponseCertificatesItem", }) as any as S.Schema; export type CertificatePacksGetResponseCertificatesList = Array; export const CertificatePacksGetResponseCertificatesList = /*@__PURE__*/ S.Array( CertificatePacksGetResponseCertificatesItem, ) as any as S.Schema; export type CertificatePacksGetResponseHostsList = Array; export const CertificatePacksGetResponseHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksGetResponseStatus = | "initializing" | "pending_validation" | "deleted" | "pending_issuance" | "pending_deployment" | "pending_deletion" | "pending_expiration" | "expired" | "active" | "initializing_timed_out" | "validation_timed_out" | "issuance_timed_out" | "deployment_timed_out" | "deletion_timed_out" | "pending_cleanup" | "staging_deployment" | "staging_active" | "deactivating" | "inactive" | "backup_issued" | "holding_deployment"; export const CertificatePacksGetResponseStatus = /*@__PURE__*/ S.String; export type CertificatePacksGetResponseType = | "mh_custom" | "managed_hostname" | "sni_custom" | "universal" | "advanced" | "total_tls" | "keyless" | "legacy_custom"; export const CertificatePacksGetResponseType = /*@__PURE__*/ S.String; export type CertificatePacksGetResponseCertificateAuthority = | "google" | "lets_encrypt" | "ssl_com"; export const CertificatePacksGetResponseCertificateAuthority = /*@__PURE__*/ S.String; export type CertificatePacksGetResponseDcvDelegationRecordsItemEmailsList = Array; export const CertificatePacksGetResponseDcvDelegationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksGetResponseDcvDelegationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksGetResponseDcvDelegationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksGetResponseDcvDelegationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr(CertificatePacksGetResponseDcvDelegationRecordsItemEmailsList), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksGetResponseDcvDelegationRecordsItem", }) as any as S.Schema; export type CertificatePacksGetResponseDcvDelegationRecordsList = Array; export const CertificatePacksGetResponseDcvDelegationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksGetResponseDcvDelegationRecordsItem, ) as any as S.Schema; export type CertificatePacksGetResponseValidationErrorsItem = CertificatePacksCreateResponseValidationErrorsItem; export const CertificatePacksGetResponseValidationErrorsItem = CertificatePacksCreateResponseValidationErrorsItem; export type CertificatePacksGetResponseValidationErrorsList = Array; export const CertificatePacksGetResponseValidationErrorsList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseValidationErrorsItem, ) as any as S.Schema; export type CertificatePacksGetResponseValidationMethod = | "txt" | "http" | "email" | "cname"; export const CertificatePacksGetResponseValidationMethod = /*@__PURE__*/ S.String; export type CertificatePacksGetResponseValidationRecordsItemEmailsList = Array; export const CertificatePacksGetResponseValidationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksGetResponseValidationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksGetResponseValidationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksGetResponseValidationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr(CertificatePacksGetResponseValidationRecordsItemEmailsList), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksGetResponseValidationRecordsItem", }) as any as S.Schema; export type CertificatePacksGetResponseValidationRecordsList = Array; export const CertificatePacksGetResponseValidationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksGetResponseValidationRecordsItem, ) as any as S.Schema; export type CertificatePacksGetResponseValidityDays = 14 | 30 | 90 | 365; export const CertificatePacksGetResponseValidityDays = /*@__PURE__*/ S.Number; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCertificatePackResponse { /** Identifier. */ id: string; /** Array of certificates in this pack. */ certificates: CertificatePacksGetResponseCertificatesList; /** Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. */ hosts: CertificatePacksGetResponseHostsList; /** Status of certificate pack. */ status: CertificatePacksGetResponseStatus; /** Type of certificate pack. */ type: CertificatePacksGetResponseType; /** Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities). */ certificateAuthority?: CertificatePacksGetResponseCertificateAuthority | null; /** Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. */ cloudflareBranding?: boolean | null; /** DCV Delegation records for domain validation. */ dcvDelegationRecords?: CertificatePacksGetResponseDcvDelegationRecordsList | null; /** Identifier of the primary certificate in a pack. */ primaryCertificate?: string | null; /** Domain validation errors that have been received by the certificate authority (CA). */ validationErrors?: CertificatePacksGetResponseValidationErrorsList | null; /** Validation Method selected for the order. */ validationMethod?: CertificatePacksGetResponseValidationMethod | null; /** Certificates' validation records. */ validationRecords?: CertificatePacksGetResponseValidationRecordsList | null; /** Validity Days selected for the order. */ validityDays?: CertificatePacksGetResponseValidityDays | null; } export const GetCertificatePackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, certificates: CertificatePacksGetResponseCertificatesList, hosts: CertificatePacksGetResponseHostsList, status: CertificatePacksGetResponseStatus, type: CertificatePacksGetResponseType, certificateAuthority: S.optional( S.NullOr(CertificatePacksGetResponseCertificateAuthority).pipe( T.Body("certificate_authority"), ), ), cloudflareBranding: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_branding")), ), dcvDelegationRecords: S.optional( S.NullOr(CertificatePacksGetResponseDcvDelegationRecordsList).pipe( T.Body("dcv_delegation_records"), ), ), primaryCertificate: S.optional( S.NullOr(S.String).pipe(T.Body("primary_certificate")), ), validationErrors: S.optional( S.NullOr(CertificatePacksGetResponseValidationErrorsList).pipe( T.Body("validation_errors"), ), ), validationMethod: S.optional( S.NullOr(CertificatePacksGetResponseValidationMethod).pipe( T.Body("validation_method"), ), ), validationRecords: S.optional( S.NullOr(CertificatePacksGetResponseValidationRecordsList).pipe( T.Body("validation_records"), ), ), validityDays: S.optional( S.NullOr(CertificatePacksGetResponseValidityDays).pipe( T.Body("validity_days"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCertificatePackResponse", }) as any as S.Schema; export interface GetCertificatePackQuotaRequest { /** Identifier. */ zoneId: string; } export const GetCertificatePackQuotaRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/ssl/certificate_packs/quota", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCertificatePackQuotaRequest", }) as any as S.Schema; export interface CertificatePacksQuotaGetResponseAdvanced { /** Quantity Allocated. */ allocated?: number | null; /** Quantity Used. */ used?: number | null; } export const CertificatePacksQuotaGetResponseAdvanced = /*@__PURE__*/ S.suspend( () => S.Struct({ allocated: S.optional(S.NullOr(S.Number)), used: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "CertificatePacksQuotaGetResponseAdvanced", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCertificatePackQuotaResponse { advanced?: CertificatePacksQuotaGetResponseAdvanced | null; } export const GetCertificatePackQuotaResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ advanced: S.optional(S.NullOr(CertificatePacksQuotaGetResponseAdvanced)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCertificatePackQuotaResponse", }) as any as S.Schema; export interface GetUniversalSettingRequest { /** Identifier. */ zoneId: string; } export const GetUniversalSettingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/ssl/universal/settings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUniversalSettingRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetUniversalSettingResponse { /** Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS. */ enabled?: boolean | null; } export const GetUniversalSettingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUniversalSettingResponse", }) as any as S.Schema; export interface GetVerificationRequest { /** Identifier. */ zoneId: string; /** Immediately retry SSL Verification. */ retry?: boolean; } export const GetVerificationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), retry: S.optional(S.Boolean.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/ssl/verification", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetVerificationRequest", }) as any as S.Schema; export type VerificationGetResultItemCertificateStatus = | "initializing" | "authorizing" | "active" | "expired" | "issuing" | "timing_out" | "pending_deployment"; export const VerificationGetResultItemCertificateStatus = /*@__PURE__*/ S.String; export type VerificationGetResultItemSignature = | "ECDSAWithSHA256" | "SHA1WithRSA" | "SHA256WithRSA"; export const VerificationGetResultItemSignature = /*@__PURE__*/ S.String; export type VerificationGetResultItemValidationMethod = | "http" | "cname" | "txt"; export const VerificationGetResultItemValidationMethod = /*@__PURE__*/ S.String; export type VerificationGetResultItemVerificationInfoRecordName = | "record_name" | "http_url" | "cname" | "txt_name"; export const VerificationGetResultItemVerificationInfoRecordName = /*@__PURE__*/ S.String; export type VerificationGetResultItemVerificationInfoRecordTarget = | "record_value" | "http_body" | "cname_target" | "txt_value"; export const VerificationGetResultItemVerificationInfoRecordTarget = /*@__PURE__*/ S.String; export interface VerificationGetResultItemVerificationInfo { /** Name of CNAME record. */ recordName?: VerificationGetResultItemVerificationInfoRecordName | null; /** Target of CNAME record. */ recordTarget?: VerificationGetResultItemVerificationInfoRecordTarget | null; } export const VerificationGetResultItemVerificationInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ recordName: S.optional( S.NullOr(VerificationGetResultItemVerificationInfoRecordName).pipe( T.Body("record_name"), ), ), recordTarget: S.optional( S.NullOr(VerificationGetResultItemVerificationInfoRecordTarget).pipe( T.Body("record_target"), ), ), }), ).annotate({ identifier: "VerificationGetResultItemVerificationInfo", }) as any as S.Schema; export type VerificationGetResultItemVerificationType = "cname" | "meta tag"; export const VerificationGetResultItemVerificationType = /*@__PURE__*/ S.String; export interface VerificationGetResultItem { /** Current status of certificate. */ certificateStatus: VerificationGetResultItemCertificateStatus; /** Certificate Authority is manually reviewing the order. */ brandCheck?: boolean | null; /** Certificate Pack UUID. */ certPackUuid?: string | null; /** Certificate's signature algorithm. */ signature?: VerificationGetResultItemSignature | null; /** Validation method in use for a certificate pack order. */ validationMethod?: VerificationGetResultItemValidationMethod | null; /** Certificate's required verification information. */ verificationInfo?: VerificationGetResultItemVerificationInfo | null; /** Status of the required verification information, omitted if verification status is unknown. */ verificationStatus?: boolean | null; /** Method of verification. */ verificationType?: VerificationGetResultItemVerificationType | null; } export const VerificationGetResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ certificateStatus: VerificationGetResultItemCertificateStatus.pipe( T.Body("certificate_status"), ), brandCheck: S.optional(S.NullOr(S.Boolean).pipe(T.Body("brand_check"))), certPackUuid: S.optional(S.NullOr(S.String).pipe(T.Body("cert_pack_uuid"))), signature: S.optional(S.NullOr(VerificationGetResultItemSignature)), validationMethod: S.optional( S.NullOr(VerificationGetResultItemValidationMethod).pipe( T.Body("validation_method"), ), ), verificationInfo: S.optional( S.NullOr(VerificationGetResultItemVerificationInfo).pipe( T.Body("verification_info"), ), ), verificationStatus: S.optional( S.NullOr(S.Boolean).pipe(T.Body("verification_status")), ), verificationType: S.optional( S.NullOr(VerificationGetResultItemVerificationType).pipe( T.Body("verification_type"), ), ), }), ).annotate({ identifier: "VerificationGetResultItem", }) as any as S.Schema; export type VerificationGetResultList = Array; export const VerificationGetResultList = /*@__PURE__*/ S.Array( VerificationGetResultItem, ) as any as S.Schema; export type GetVerificationResponse = VerificationGetResultList; export const GetVerificationResponse = /*@__PURE__*/ S.suspend(() => VerificationGetResultList.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetVerificationResponse", }) as any as S.Schema; export type CertificatePacksListRequestDeploy = "staging" | "production"; export const CertificatePacksListRequestDeploy = /*@__PURE__*/ S.String; export type CertificatePacksListRequestStatus = "all"; export const CertificatePacksListRequestStatus = /*@__PURE__*/ S.String; export interface ListCertificatePacksRequest { /** Identifier. */ zoneId: string; /** Specify the deployment environment for the certificate packs. */ deploy?: CertificatePacksListRequestDeploy | (string & {}); /** Page number of paginated results. */ page?: number; /** Number of certificate packs per page. */ perPage?: number; /** Include Certificate Packs of all statuses, not just active ones. */ status?: CertificatePacksListRequestStatus | (string & {}); } export const ListCertificatePacksRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), deploy: S.optional(CertificatePacksListRequestDeploy.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), status: S.optional(CertificatePacksListRequestStatus.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/ssl/certificate_packs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCertificatePacksRequest", }) as any as S.Schema; export type CertificatePacksListResultItemCertificatesItemHostsList = Array; export const CertificatePacksListResultItemCertificatesItemHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksListResultItemCertificatesItemGeoRestrictionsLabel = | "us" | "eu" | "highest_security"; export const CertificatePacksListResultItemCertificatesItemGeoRestrictionsLabel = /*@__PURE__*/ S.String; export interface CertificatePacksListResultItemCertificatesItemGeoRestrictions { label?: CertificatePacksListResultItemCertificatesItemGeoRestrictionsLabel | null; } export const CertificatePacksListResultItemCertificatesItemGeoRestrictions = /*@__PURE__*/ S.suspend(() => S.Struct({ label: S.optional( S.NullOr( CertificatePacksListResultItemCertificatesItemGeoRestrictionsLabel, ), ), }), ).annotate({ identifier: "CertificatePacksListResultItemCertificatesItemGeoRestrictions", }) as any as S.Schema; export interface CertificatePacksListResultItemCertificatesItem { /** Certificate identifier. */ id: string; /** Hostnames covered by this certificate. */ hosts: CertificatePacksListResultItemCertificatesItemHostsList; /** Certificate status. */ status: string; /** Certificate bundle method. */ bundleMethod?: string | null; /** When the certificate from the authority expires. */ expiresOn?: string | null; /** Specify the region where your private key can be held locally. */ geoRestrictions?: CertificatePacksListResultItemCertificatesItemGeoRestrictions | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** When the certificate was last modified. */ modifiedOn?: string | null; /** The order/priority in which the certificate will be used. */ priority?: number | null; /** The type of hash used for the certificate. */ signature?: string | null; /** When the certificate was uploaded to Cloudflare. */ uploadedOn?: string | null; /** Identifier. */ zoneId?: string | null; } export const CertificatePacksListResultItemCertificatesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, hosts: CertificatePacksListResultItemCertificatesItemHostsList, status: S.String, bundleMethod: S.optional( S.NullOr(S.String).pipe(T.Body("bundle_method")), ), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), geoRestrictions: S.optional( S.NullOr( CertificatePacksListResultItemCertificatesItemGeoRestrictions, ).pipe(T.Body("geo_restrictions")), ), issuer: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), priority: S.optional(S.NullOr(S.Number)), signature: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), zoneId: S.optional(S.NullOr(S.String).pipe(T.Body("zone_id"))), }), ).annotate({ identifier: "CertificatePacksListResultItemCertificatesItem", }) as any as S.Schema; export type CertificatePacksListResultItemCertificatesList = Array; export const CertificatePacksListResultItemCertificatesList = /*@__PURE__*/ S.Array( CertificatePacksListResultItemCertificatesItem, ) as any as S.Schema; export type CertificatePacksListResultItemHostsList = Array; export const CertificatePacksListResultItemHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksListResultItemStatus = | "initializing" | "pending_validation" | "deleted" | "pending_issuance" | "pending_deployment" | "pending_deletion" | "pending_expiration" | "expired" | "active" | "initializing_timed_out" | "validation_timed_out" | "issuance_timed_out" | "deployment_timed_out" | "deletion_timed_out" | "pending_cleanup" | "staging_deployment" | "staging_active" | "deactivating" | "inactive" | "backup_issued" | "holding_deployment"; export const CertificatePacksListResultItemStatus = /*@__PURE__*/ S.String; export type CertificatePacksListResultItemType = | "mh_custom" | "managed_hostname" | "sni_custom" | "universal" | "advanced" | "total_tls" | "keyless" | "legacy_custom"; export const CertificatePacksListResultItemType = /*@__PURE__*/ S.String; export type CertificatePacksListResultItemCertificateAuthority = | "google" | "lets_encrypt" | "ssl_com"; export const CertificatePacksListResultItemCertificateAuthority = /*@__PURE__*/ S.String; export type CertificatePacksListResultItemDcvDelegationRecordsItemEmailsList = Array; export const CertificatePacksListResultItemDcvDelegationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksListResultItemDcvDelegationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksListResultItemDcvDelegationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksListResultItemDcvDelegationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr( CertificatePacksListResultItemDcvDelegationRecordsItemEmailsList, ), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksListResultItemDcvDelegationRecordsItem", }) as any as S.Schema; export type CertificatePacksListResultItemDcvDelegationRecordsList = Array; export const CertificatePacksListResultItemDcvDelegationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksListResultItemDcvDelegationRecordsItem, ) as any as S.Schema; export type CertificatePacksListResultItemValidationErrorsItem = CertificatePacksCreateResponseValidationErrorsItem; export const CertificatePacksListResultItemValidationErrorsItem = CertificatePacksCreateResponseValidationErrorsItem; export type CertificatePacksListResultItemValidationErrorsList = Array; export const CertificatePacksListResultItemValidationErrorsList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseValidationErrorsItem, ) as any as S.Schema; export type CertificatePacksListResultItemValidationMethod = | "txt" | "http" | "email"; export const CertificatePacksListResultItemValidationMethod = /*@__PURE__*/ S.String; export type CertificatePacksListResultItemValidationRecordsItemEmailsList = Array; export const CertificatePacksListResultItemValidationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksListResultItemValidationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksListResultItemValidationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksListResultItemValidationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr(CertificatePacksListResultItemValidationRecordsItemEmailsList), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksListResultItemValidationRecordsItem", }) as any as S.Schema; export type CertificatePacksListResultItemValidationRecordsList = Array; export const CertificatePacksListResultItemValidationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksListResultItemValidationRecordsItem, ) as any as S.Schema; export type CertificatePacksListResultItemValidityDays = 14 | 30 | 90 | 365; export const CertificatePacksListResultItemValidityDays = /*@__PURE__*/ S.Number; export interface CertificatePacksListResultItem { /** Identifier. */ id: string; /** Array of certificates in this pack. */ certificates: CertificatePacksListResultItemCertificatesList; /** Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. */ hosts: CertificatePacksListResultItemHostsList; /** Status of certificate pack. */ status: CertificatePacksListResultItemStatus; /** Type of certificate pack. */ type: CertificatePacksListResultItemType; /** Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities). */ certificateAuthority?: CertificatePacksListResultItemCertificateAuthority | null; /** Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. */ cloudflareBranding?: boolean | null; /** DCV Delegation records for domain validation. */ dcvDelegationRecords?: CertificatePacksListResultItemDcvDelegationRecordsList | null; /** Identifier of the primary certificate in a pack. */ primaryCertificate?: string | null; /** Domain validation errors that have been received by the certificate authority (CA). */ validationErrors?: CertificatePacksListResultItemValidationErrorsList | null; /** Validation Method selected for the order. */ validationMethod?: CertificatePacksListResultItemValidationMethod | null; /** Certificates' validation records. */ validationRecords?: CertificatePacksListResultItemValidationRecordsList | null; /** Validity Days selected for the order. */ validityDays?: CertificatePacksListResultItemValidityDays | null; } export const CertificatePacksListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, certificates: CertificatePacksListResultItemCertificatesList, hosts: CertificatePacksListResultItemHostsList, status: CertificatePacksListResultItemStatus, type: CertificatePacksListResultItemType, certificateAuthority: S.optional( S.NullOr(CertificatePacksListResultItemCertificateAuthority).pipe( T.Body("certificate_authority"), ), ), cloudflareBranding: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_branding")), ), dcvDelegationRecords: S.optional( S.NullOr(CertificatePacksListResultItemDcvDelegationRecordsList).pipe( T.Body("dcv_delegation_records"), ), ), primaryCertificate: S.optional( S.NullOr(S.String).pipe(T.Body("primary_certificate")), ), validationErrors: S.optional( S.NullOr(CertificatePacksListResultItemValidationErrorsList).pipe( T.Body("validation_errors"), ), ), validationMethod: S.optional( S.NullOr(CertificatePacksListResultItemValidationMethod).pipe( T.Body("validation_method"), ), ), validationRecords: S.optional( S.NullOr(CertificatePacksListResultItemValidationRecordsList).pipe( T.Body("validation_records"), ), ), validityDays: S.optional( S.NullOr(CertificatePacksListResultItemValidityDays).pipe( T.Body("validity_days"), ), ), }), ).annotate({ identifier: "CertificatePacksListResultItem", }) as any as S.Schema; export type CertificatePacksListResultList = Array; export const CertificatePacksListResultList = /*@__PURE__*/ S.Array( CertificatePacksListResultItem, ) as any as S.Schema; export interface ListCertificatePacksResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: CertificatePacksListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListCertificatePacksResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: CertificatePacksListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCertificatePacksResponse", }) as any as S.Schema; export type PatchAutomaticUpgraderRequestValue = "auto" | "custom"; export const PatchAutomaticUpgraderRequestValue = /*@__PURE__*/ S.String; export interface PatchAutomaticUpgraderRequest { zoneId: string; /** Controls enablement of Automatic SSL/TLS. */ value: PatchAutomaticUpgraderRequestValue | (string & {}); } export const PatchAutomaticUpgraderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), value: PatchAutomaticUpgraderRequestValue, }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/settings/ssl_automatic_mode", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAutomaticUpgraderRequest", }) as any as S.Schema; export type PatchAutomaticUpgraderResponseValue = "auto" | "custom"; export const PatchAutomaticUpgraderResponseValue = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAutomaticUpgraderResponse { id: string; /** Whether this setting can be updated or not. */ editable: boolean; /** Last time this setting was modified. */ modifiedOn: string; /** Current setting of the automatic SSL/TLS. */ value: PatchAutomaticUpgraderResponseValue; /** Next time this zone will be scanned by the Automatic SSL/TLS. */ nextScheduledScan?: string | null; } export const PatchAutomaticUpgraderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, editable: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), value: PatchAutomaticUpgraderResponseValue, nextScheduledScan: S.optional( S.NullOr(S.String).pipe(T.Body("next_scheduled_scan")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAutomaticUpgraderResponse", }) as any as S.Schema; export interface PatchAutoOriginTlsKexRequest { zoneId: string; /** Controls enablement of Auto-Origin TLS KEX selection for the zone. */ enabled: boolean; } export const PatchAutoOriginTlsKexRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), enabled: S.Boolean, }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/settings/auto_origin_tls_kex", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAutoOriginTlsKexRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAutoOriginTlsKexResponse { id: string; /** Whether Auto-Origin TLS KEX selection is enabled for the zone. */ enabled: boolean; /** Last time this setting was modified. */ modifiedOn: string; } export const PatchAutoOriginTlsKexResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, enabled: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAutoOriginTlsKexResponse", }) as any as S.Schema; export interface PatchCertificatePackRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificatePackId: string; /** Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. */ cloudflareBranding?: boolean; } export const PatchCertificatePackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificatePackId: S.String.pipe(T.Label("certificate_pack_id")), cloudflareBranding: S.optional( S.Boolean.pipe(T.Body("cloudflare_branding")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCertificatePackRequest", }) as any as S.Schema; export type CertificatePacksEditResponseCertificatesItemHostsList = Array; export const CertificatePacksEditResponseCertificatesItemHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksEditResponseCertificatesItemGeoRestrictionsLabel = | "us" | "eu" | "highest_security"; export const CertificatePacksEditResponseCertificatesItemGeoRestrictionsLabel = /*@__PURE__*/ S.String; export interface CertificatePacksEditResponseCertificatesItemGeoRestrictions { label?: CertificatePacksEditResponseCertificatesItemGeoRestrictionsLabel | null; } export const CertificatePacksEditResponseCertificatesItemGeoRestrictions = /*@__PURE__*/ S.suspend(() => S.Struct({ label: S.optional( S.NullOr( CertificatePacksEditResponseCertificatesItemGeoRestrictionsLabel, ), ), }), ).annotate({ identifier: "CertificatePacksEditResponseCertificatesItemGeoRestrictions", }) as any as S.Schema; export interface CertificatePacksEditResponseCertificatesItem { /** Certificate identifier. */ id: string; /** Hostnames covered by this certificate. */ hosts: CertificatePacksEditResponseCertificatesItemHostsList; /** Certificate status. */ status: string; /** Certificate bundle method. */ bundleMethod?: string | null; /** When the certificate from the authority expires. */ expiresOn?: string | null; /** Specify the region where your private key can be held locally. */ geoRestrictions?: CertificatePacksEditResponseCertificatesItemGeoRestrictions | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** When the certificate was last modified. */ modifiedOn?: string | null; /** The order/priority in which the certificate will be used. */ priority?: number | null; /** The type of hash used for the certificate. */ signature?: string | null; /** When the certificate was uploaded to Cloudflare. */ uploadedOn?: string | null; /** Identifier. */ zoneId?: string | null; } export const CertificatePacksEditResponseCertificatesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, hosts: CertificatePacksEditResponseCertificatesItemHostsList, status: S.String, bundleMethod: S.optional( S.NullOr(S.String).pipe(T.Body("bundle_method")), ), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), geoRestrictions: S.optional( S.NullOr( CertificatePacksEditResponseCertificatesItemGeoRestrictions, ).pipe(T.Body("geo_restrictions")), ), issuer: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), priority: S.optional(S.NullOr(S.Number)), signature: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), zoneId: S.optional(S.NullOr(S.String).pipe(T.Body("zone_id"))), }), ).annotate({ identifier: "CertificatePacksEditResponseCertificatesItem", }) as any as S.Schema; export type CertificatePacksEditResponseCertificatesList = Array; export const CertificatePacksEditResponseCertificatesList = /*@__PURE__*/ S.Array( CertificatePacksEditResponseCertificatesItem, ) as any as S.Schema; export type CertificatePacksEditResponseHostsList = Array; export const CertificatePacksEditResponseHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CertificatePacksEditResponseStatus = | "initializing" | "pending_validation" | "deleted" | "pending_issuance" | "pending_deployment" | "pending_deletion" | "pending_expiration" | "expired" | "active" | "initializing_timed_out" | "validation_timed_out" | "issuance_timed_out" | "deployment_timed_out" | "deletion_timed_out" | "pending_cleanup" | "staging_deployment" | "staging_active" | "deactivating" | "inactive" | "backup_issued" | "holding_deployment"; export const CertificatePacksEditResponseStatus = /*@__PURE__*/ S.String; export type CertificatePacksEditResponseType = | "mh_custom" | "managed_hostname" | "sni_custom" | "universal" | "advanced" | "total_tls" | "keyless" | "legacy_custom"; export const CertificatePacksEditResponseType = /*@__PURE__*/ S.String; export type CertificatePacksEditResponseCertificateAuthority = | "google" | "lets_encrypt" | "ssl_com"; export const CertificatePacksEditResponseCertificateAuthority = /*@__PURE__*/ S.String; export type CertificatePacksEditResponseDcvDelegationRecordsItemEmailsList = Array; export const CertificatePacksEditResponseDcvDelegationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksEditResponseDcvDelegationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksEditResponseDcvDelegationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksEditResponseDcvDelegationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr( CertificatePacksEditResponseDcvDelegationRecordsItemEmailsList, ), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksEditResponseDcvDelegationRecordsItem", }) as any as S.Schema; export type CertificatePacksEditResponseDcvDelegationRecordsList = Array; export const CertificatePacksEditResponseDcvDelegationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksEditResponseDcvDelegationRecordsItem, ) as any as S.Schema; export type CertificatePacksEditResponseValidationErrorsItem = CertificatePacksCreateResponseValidationErrorsItem; export const CertificatePacksEditResponseValidationErrorsItem = CertificatePacksCreateResponseValidationErrorsItem; export type CertificatePacksEditResponseValidationErrorsList = Array; export const CertificatePacksEditResponseValidationErrorsList = /*@__PURE__*/ S.Array( CertificatePacksCreateResponseValidationErrorsItem, ) as any as S.Schema; export type CertificatePacksEditResponseValidationMethod = | "txt" | "http" | "email"; export const CertificatePacksEditResponseValidationMethod = /*@__PURE__*/ S.String; export type CertificatePacksEditResponseValidationRecordsItemEmailsList = Array; export const CertificatePacksEditResponseValidationRecordsItemEmailsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CertificatePacksEditResponseValidationRecordsItem { /** The CNAME record hostname for DCV delegation. */ cname?: string | null; /** The CNAME record target value for DCV delegation. */ cnameTarget?: string | null; /** The set of email addresses that the certificate authority (CA) will use to complete domain validation. */ emails?: CertificatePacksEditResponseValidationRecordsItemEmailsList | null; /** The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. */ httpBody?: string | null; /** The url that will be checked during domain validation. */ httpUrl?: string | null; /** Status of the validation record. */ status?: string | null; /** The hostname that the certificate authority (CA) will check for a TXT record during domain validation . */ txtName?: string | null; /** The TXT record that the certificate authority (CA) will check during domain validation. */ txtValue?: string | null; } export const CertificatePacksEditResponseValidationRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ cname: S.optional(S.NullOr(S.String)), cnameTarget: S.optional(S.NullOr(S.String).pipe(T.Body("cname_target"))), emails: S.optional( S.NullOr(CertificatePacksEditResponseValidationRecordsItemEmailsList), ), httpBody: S.optional(S.NullOr(S.String).pipe(T.Body("http_body"))), httpUrl: S.optional(S.NullOr(S.String).pipe(T.Body("http_url"))), status: S.optional(S.NullOr(S.String)), txtName: S.optional(S.NullOr(S.String).pipe(T.Body("txt_name"))), txtValue: S.optional(S.NullOr(S.String).pipe(T.Body("txt_value"))), }), ).annotate({ identifier: "CertificatePacksEditResponseValidationRecordsItem", }) as any as S.Schema; export type CertificatePacksEditResponseValidationRecordsList = Array; export const CertificatePacksEditResponseValidationRecordsList = /*@__PURE__*/ S.Array( CertificatePacksEditResponseValidationRecordsItem, ) as any as S.Schema; export type CertificatePacksEditResponseValidityDays = 14 | 30 | 90 | 365; export const CertificatePacksEditResponseValidityDays = /*@__PURE__*/ S.Number; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchCertificatePackResponse { /** Identifier. */ id: string; /** Array of certificates in this pack. */ certificates: CertificatePacksEditResponseCertificatesList; /** Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. */ hosts: CertificatePacksEditResponseHostsList; /** Status of certificate pack. */ status: CertificatePacksEditResponseStatus; /** Type of certificate pack. */ type: CertificatePacksEditResponseType; /** Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities). */ certificateAuthority?: CertificatePacksEditResponseCertificateAuthority | null; /** Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. */ cloudflareBranding?: boolean | null; /** DCV Delegation records for domain validation. */ dcvDelegationRecords?: CertificatePacksEditResponseDcvDelegationRecordsList | null; /** Identifier of the primary certificate in a pack. */ primaryCertificate?: string | null; /** Domain validation errors that have been received by the certificate authority (CA). */ validationErrors?: CertificatePacksEditResponseValidationErrorsList | null; /** Validation Method selected for the order. */ validationMethod?: CertificatePacksEditResponseValidationMethod | null; /** Certificates' validation records. */ validationRecords?: CertificatePacksEditResponseValidationRecordsList | null; /** Validity Days selected for the order. */ validityDays?: CertificatePacksEditResponseValidityDays | null; } export const PatchCertificatePackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, certificates: CertificatePacksEditResponseCertificatesList, hosts: CertificatePacksEditResponseHostsList, status: CertificatePacksEditResponseStatus, type: CertificatePacksEditResponseType, certificateAuthority: S.optional( S.NullOr(CertificatePacksEditResponseCertificateAuthority).pipe( T.Body("certificate_authority"), ), ), cloudflareBranding: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_branding")), ), dcvDelegationRecords: S.optional( S.NullOr(CertificatePacksEditResponseDcvDelegationRecordsList).pipe( T.Body("dcv_delegation_records"), ), ), primaryCertificate: S.optional( S.NullOr(S.String).pipe(T.Body("primary_certificate")), ), validationErrors: S.optional( S.NullOr(CertificatePacksEditResponseValidationErrorsList).pipe( T.Body("validation_errors"), ), ), validationMethod: S.optional( S.NullOr(CertificatePacksEditResponseValidationMethod).pipe( T.Body("validation_method"), ), ), validationRecords: S.optional( S.NullOr(CertificatePacksEditResponseValidationRecordsList).pipe( T.Body("validation_records"), ), ), validityDays: S.optional( S.NullOr(CertificatePacksEditResponseValidityDays).pipe( T.Body("validity_days"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCertificatePackResponse", }) as any as S.Schema; export interface PatchUniversalSettingRequest { /** Identifier. */ zoneId: string; /** Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS. */ enabled?: boolean; } export const PatchUniversalSettingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), enabled: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/ssl/universal/settings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchUniversalSettingRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchUniversalSettingResponse { /** Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS. */ enabled?: boolean | null; } export const PatchUniversalSettingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchUniversalSettingResponse", }) as any as S.Schema; export type VerificationEditRequestValidationMethod = | "http" | "cname" | "txt" | "email"; export const VerificationEditRequestValidationMethod = /*@__PURE__*/ S.String; export interface PatchVerificationRequest { /** Identifier. */ zoneId: string; /** Certificate Pack UUID. */ certificatePackId: string; /** Desired validation method. */ validationMethod: VerificationEditRequestValidationMethod | (string & {}); } export const PatchVerificationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificatePackId: S.String.pipe(T.Label("certificate_pack_id")), validationMethod: VerificationEditRequestValidationMethod.pipe( T.Body("validation_method"), ), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/ssl/verification/{certificate_pack_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchVerificationRequest", }) as any as S.Schema; export type VerificationEditResponseValidationMethod = | "http" | "cname" | "txt" | "email"; export const VerificationEditResponseValidationMethod = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchVerificationResponse { /** Result status. */ status?: string | null; /** Desired validation method. */ validationMethod?: VerificationEditResponseValidationMethod | null; } export const PatchVerificationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ status: S.optional(S.NullOr(S.String)), validationMethod: S.optional( S.NullOr(VerificationEditResponseValidationMethod).pipe( T.Body("validation_method"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchVerificationResponse", }) as any as S.Schema; export type CreateAnalyzeError = CloudflareOpError; /** Returns the set of hostnames, the signature algorithm, and the expiration date of the certificate. */ export const createAnalyze: API.OperationMethod< CreateAnalyzeRequest, CreateAnalyzeResponse, CreateAnalyzeError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAnalyzeRequest, output: CreateAnalyzeResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateCertificatePackError = | AdvancedCertificateManagerRequired | Forbidden | CloudflareOpError; /** For a given zone, order an advanced certificate pack. */ export const createCertificatePack: API.OperationMethod< CreateCertificatePackRequest, CreateCertificatePackResponse, CreateCertificatePackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateCertificatePackRequest, output: CreateCertificatePackResponse, errors: [ AdvancedCertificateManagerRequired, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteCertificatePackError = | CertificatePackNotFound | Forbidden | CloudflareOpError; /** For a given zone, delete an advanced certificate pack. */ export const deleteCertificatePack: API.OperationMethod< DeleteCertificatePackRequest, DeleteCertificatePackResponse, DeleteCertificatePackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteCertificatePackRequest, output: DeleteCertificatePackResponse, errors: [ CertificatePackNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAutomaticUpgraderError = CloudflareOpError; /** If the system is enabled, the response will include next_scheduled_scan, representing the next time this zone will be scanned and the zone's ssl/tls encryption mode is potentially upgraded by the system. If the system is disabled, next_scheduled_scan will not be present in the response body. */ export const getAutomaticUpgrader: API.OperationMethod< GetAutomaticUpgraderRequest, GetAutomaticUpgraderResponse, GetAutomaticUpgraderError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAutomaticUpgraderRequest, output: GetAutomaticUpgraderResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAutoOriginTlsKexError = CloudflareOpError; /** When enabled, Cloudflare automatically selects the preferred TLS key-exchange algorithm to use when establishing the TLS connection to the zone's origin, picking from the algorithms permitted by the zone's `origin_tls_compliance_modes` setting. When disabled, the default key-exchange ordering is used. */ export const getAutoOriginTlsKex: API.OperationMethod< GetAutoOriginTlsKexRequest, GetAutoOriginTlsKexResponse, GetAutoOriginTlsKexError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAutoOriginTlsKexRequest, output: GetAutoOriginTlsKexResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCertificatePackError = | CertificatePackNotFound | Forbidden | CloudflareOpError; /** For a given zone, get a certificate pack. */ export const getCertificatePack: API.OperationMethod< GetCertificatePackRequest, GetCertificatePackResponse, GetCertificatePackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCertificatePackRequest, output: GetCertificatePackResponse, errors: [ CertificatePackNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCertificatePackQuotaError = CloudflareOpError; /** For a given zone, list certificate pack quotas. */ export const getCertificatePackQuota: API.OperationMethod< GetCertificatePackQuotaRequest, GetCertificatePackQuotaResponse, GetCertificatePackQuotaError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCertificatePackQuotaRequest, output: GetCertificatePackQuotaResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetUniversalSettingError = Forbidden | CloudflareOpError; /** Get Universal SSL Settings for a Zone. */ export const getUniversalSetting: API.OperationMethod< GetUniversalSettingRequest, GetUniversalSettingResponse, GetUniversalSettingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetUniversalSettingRequest, output: GetUniversalSettingResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetVerificationError = CloudflareOpError; /** Get SSL Verification Info for a Zone. */ export const getVerification: API.OperationMethod< GetVerificationRequest, GetVerificationResponse, GetVerificationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetVerificationRequest, output: GetVerificationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListCertificatePacksError = Forbidden | CloudflareOpError; /** For a given zone, list all active certificate packs. */ export const listCertificatePacks: API.PaginatedOperationMethod< ListCertificatePacksRequest, ListCertificatePacksResponse, ListCertificatePacksError, CloudflareOpContext, CertificatePacksListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCertificatePacksRequest, output: ListCertificatePacksResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type PatchAutomaticUpgraderError = CloudflareOpError; /** The automatic system is enabled when this endpoint is hit with value in the request body is set to "auto", and disabled when the request body value is set to "custom". */ export const patchAutomaticUpgrader: API.OperationMethod< PatchAutomaticUpgraderRequest, PatchAutomaticUpgraderResponse, PatchAutomaticUpgraderError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAutomaticUpgraderRequest, output: PatchAutomaticUpgraderResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAutoOriginTlsKexError = CloudflareOpError; /** Enable or disable Auto-Origin TLS KEX selection for the zone by sending `{"enabled": true}` or `{"enabled": false}`. When enabled, Cloudflare runs a periodic scan of the zone's origins to determine the preferred key-exchange algorithm and writes that preference to the edge so it is sent first in the TLS ClientHello to the origin. */ export const patchAutoOriginTlsKex: API.OperationMethod< PatchAutoOriginTlsKexRequest, PatchAutoOriginTlsKexResponse, PatchAutoOriginTlsKexError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAutoOriginTlsKexRequest, output: PatchAutoOriginTlsKexResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchCertificatePackError = | CertificatePackNotFound | Forbidden | CloudflareOpError; /** For a given zone, restart validation or add cloudflare branding for an advanced certificate pack. The former is only a validation operation for a Certificate Pack in a validation_timed_out status. */ export const patchCertificatePack: API.OperationMethod< PatchCertificatePackRequest, PatchCertificatePackResponse, PatchCertificatePackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchCertificatePackRequest, output: PatchCertificatePackResponse, errors: [ CertificatePackNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchUniversalSettingError = Forbidden | CloudflareOpError; /** Patch Universal SSL Settings for a Zone. */ export const patchUniversalSetting: API.OperationMethod< PatchUniversalSettingRequest, PatchUniversalSettingResponse, PatchUniversalSettingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchUniversalSettingRequest, output: PatchUniversalSettingResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchVerificationError = CloudflareOpError; /** Edit SSL validation method for a certificate pack. A PATCH request will request an immediate validation check on any certificate, and return the updated status. If a validation method is provided, the validation will be immediately attempted using that method. */ export const patchVerification: API.OperationMethod< PatchVerificationRequest, PatchVerificationResponse, PatchVerificationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchVerificationRequest, output: PatchVerificationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));