// 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, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.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> = { modifiedOn: "modified_on", }; export interface DeleteOriginTlsComplianceModeRequest { /** Identifier. */ zoneId: string; } export const DeleteOriginTlsComplianceModeRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/settings/origin_tls_compliance_modes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOriginTlsComplianceModeRequest", }) as any as S.Schema; export type DeleteResponseId = "origin_tls_compliance_modes"; export const DeleteResponseId = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteOriginTlsComplianceModeResponse { /** The identifier of the caching setting. */ id: DeleteResponseId; /** Whether the setting is editable. */ editable: boolean; /** Last time this setting was modified. */ modifiedOn?: string | null; } export const DeleteOriginTlsComplianceModeResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: DeleteResponseId, editable: S.Boolean, modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOriginTlsComplianceModeResponse", }) as any as S.Schema; export interface GetOriginTlsComplianceModeRequest { /** Identifier. */ zoneId: string; } export const GetOriginTlsComplianceModeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/origin_tls_compliance_modes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOriginTlsComplianceModeRequest", }) as any as S.Schema; export type GetResponseId = "origin_tls_compliance_modes"; export const GetResponseId = /*@__PURE__*/ S.String; export type GetResponseValueList = Array; export const GetResponseValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetOriginTlsComplianceModeResponse { /** The identifier of the caching setting. */ id: GetResponseId; /** Whether the setting is editable. */ editable: boolean; /** List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint. */ value: GetResponseValueList; /** Last time this setting was modified. */ modifiedOn?: string | null; } export const GetOriginTlsComplianceModeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: GetResponseId, editable: S.Boolean, value: GetResponseValueList, modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOriginTlsComplianceModeResponse", }) as any as S.Schema; export type EditRequestValueList = Array; export const EditRequestValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PatchOriginTlsComplianceModeRequest { /** Identifier. */ zoneId: string; /** List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint. */ value: EditRequestValueList; } export const PatchOriginTlsComplianceModeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), value: EditRequestValueList, }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/settings/origin_tls_compliance_modes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchOriginTlsComplianceModeRequest", }) as any as S.Schema; export type EditResponseId = "origin_tls_compliance_modes"; export const EditResponseId = /*@__PURE__*/ S.String; export type EditResponseValueList = Array; export const EditResponseValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchOriginTlsComplianceModeResponse { /** The identifier of the caching setting. */ id: EditResponseId; /** Whether the setting is editable. */ editable: boolean; /** List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint. */ value: EditResponseValueList; /** Last time this setting was modified. */ modifiedOn?: string | null; } export const PatchOriginTlsComplianceModeResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: EditResponseId, editable: S.Boolean, value: EditResponseValueList, modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchOriginTlsComplianceModeResponse", }) as any as S.Schema; export type UpdateRequestValueList = Array; export const UpdateRequestValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PutOriginTlsComplianceModeRequest { /** Identifier. */ zoneId: string; /** List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint. */ value: UpdateRequestValueList; } export const PutOriginTlsComplianceModeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), value: UpdateRequestValueList, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/settings/origin_tls_compliance_modes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutOriginTlsComplianceModeRequest", }) as any as S.Schema; export type UpdateResponseId = "origin_tls_compliance_modes"; export const UpdateResponseId = /*@__PURE__*/ S.String; export type UpdateResponseValueList = Array; export const UpdateResponseValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutOriginTlsComplianceModeResponse { /** The identifier of the caching setting. */ id: UpdateResponseId; /** Whether the setting is editable. */ editable: boolean; /** List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint. */ value: UpdateResponseValueList; /** Last time this setting was modified. */ modifiedOn?: string | null; } export const PutOriginTlsComplianceModeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: UpdateResponseId, editable: S.Boolean, value: UpdateResponseValueList, modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutOriginTlsComplianceModeResponse", }) as any as S.Schema; export type DeleteOriginTlsComplianceModeError = CloudflareOpError; /** Delete the Origin TLS Compliance Modes setting for the zone, removing any configured compliance constraint. After deletion, Cloudflare's default behavior applies (no compliance filtering of the key-exchange algorithm list sent to the origin). */ export const deleteOriginTlsComplianceMode: API.OperationMethod< DeleteOriginTlsComplianceModeRequest, DeleteOriginTlsComplianceModeResponse, DeleteOriginTlsComplianceModeError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteOriginTlsComplianceModeRequest, output: DeleteOriginTlsComplianceModeResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetOriginTlsComplianceModeError = CloudflareOpError; /** Origin TLS Compliance Modes constrains the set of TLS key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. The value is a list of named compliance modes (currently `fips` and `pqh`). Multiple modes are combined as the intersection of their permitted algorithm lists. An empty list (or no rule configured) means no compliance constraint is applied. */ export const getOriginTlsComplianceMode: API.OperationMethod< GetOriginTlsComplianceModeRequest, GetOriginTlsComplianceModeResponse, GetOriginTlsComplianceModeError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetOriginTlsComplianceModeRequest, output: GetOriginTlsComplianceModeResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchOriginTlsComplianceModeError = CloudflareOpError; /** Update the set of TLS compliance modes for the zone. PATCH performs a full replace of the modes list, not a merge — the request body is treated as the complete new list, and any modes not present in it are removed. (To remove a single mode from an existing configuration, send the updated list without it.) The request body must be of the form `{"value": ["fips", "pqh"]}`. Currently supported modes are `fips` and `pqh`; an empty list clears the constraint. Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Invalid mode values are rejected with a 4xx response. */ export const patchOriginTlsComplianceMode: API.OperationMethod< PatchOriginTlsComplianceModeRequest, PatchOriginTlsComplianceModeResponse, PatchOriginTlsComplianceModeError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchOriginTlsComplianceModeRequest, output: PatchOriginTlsComplianceModeResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutOriginTlsComplianceModeError = CloudflareOpError; /** Replace the entire set of TLS compliance modes for the zone with the list provided in the request body. PUT performs a full replace, not a merge — any modes not present in the request body are removed. The request body must be of the form `{"value": ["fips", "pqh"]}`. Currently supported modes are `fips` and `pqh`; an empty list clears the constraint. Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Invalid mode values are rejected with a 4xx response. */ export const putOriginTlsComplianceMode: API.OperationMethod< PutOriginTlsComplianceModeRequest, PutOriginTlsComplianceModeResponse, PutOriginTlsComplianceModeError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutOriginTlsComplianceModeRequest, output: PutOriginTlsComplianceModeResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));