// 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> = { actionParameters: "action_parameters", additionalCacheablePorts: "additional_cacheable_ports", assetName: "asset_name", automaticHttpsRewrites: "automatic_https_rewrites", browserTtl: "browser_ttl", cacheByDeviceType: "cache_by_device_type", cacheDeceptionArmor: "cache_deception_armor", cacheKey: "cache_key", cacheReserve: "cache_reserve", checkPresence: "check_presence", cloudflareOnly: "cloudflare_only", contentConverter: "content_converter", contentType: "content_type", cookieFields: "cookie_fields", countingExpression: "counting_expression", customKey: "custom_key", deviceType: "device_type", disableApps: "disable_apps", disablePayPerCrawl: "disable_pay_per_crawl", disableRum: "disable_rum", disableStaleWhileUpdating: "disable_stale_while_updating", disableZaraz: "disable_zaraz", edgeTtl: "edge_ttl", emailObfuscation: "email_obfuscation", excludeOrigin: "exclude_origin", exposedCredentialCheck: "exposed_credential_check", fromList: "from_list", fromValue: "from_value", hostHeader: "host_header", hotlinkProtection: "hotlink_protection", ignoreQueryStringsOrder: "ignore_query_strings_order", lastUpdated: "last_updated", matchPattern: "match_pattern", matchedData: "matched_data", maxAge: "max-age", minimumFileSize: "minimum_file_size", mitigationTimeout: "mitigation_timeout", mustRevalidate: "must-revalidate", mustUnderstand: "must-understand", noCache: "no-cache", noStore: "no-store", noTransform: "no-transform", opportunisticEncryption: "opportunistic_encryption", originCacheControl: "origin_cache_control", originErrorPagePassthru: "origin_error_page_passthru", passwordExpression: "password_expression", perPage: "per_page", preserveDuplicates: "preserve_duplicates", preserveQueryString: "preserve_query_string", proxyRevalidate: "proxy-revalidate", publicKey: "public_key", queryString: "query_string", rawResponseFields: "raw_response_fields", readTimeout: "read_timeout", redirectsForAiTraining: "redirects_for_ai_training", requestBodyBuffering: "request_body_buffering", requestFields: "request_fields", requestsPerPeriod: "requests_per_period", requestsToOrigin: "requests_to_origin", respectStrongEtags: "respect_strong_etags", responseBodyBuffering: "response_body_buffering", responseFields: "response_fields", resultInfo: "result_info", rocketLoader: "rocket_loader", sMaxage: "s-maxage", scorePerPeriod: "score_per_period", scoreResponseHeaderName: "score_response_header_name", scoreThreshold: "score_threshold", securityLevel: "security_level", sensitivityLevel: "sensitivity_level", serveStale: "serve_stale", serverSideExcludes: "server_side_excludes", sharedDictionary: "shared_dictionary", staleIfError: "stale-if-error", staleWhileRevalidate: "stale-while-revalidate", statusCode: "status_code", statusCodeRange: "status_code_range", statusCodeTtl: "status_code_ttl", stripEtags: "strip_etags", stripLastModified: "strip_last_modified", stripSetCookie: "strip_set_cookie", targetUrl: "target_url", transformedRequestFields: "transformed_request_fields", usernameExpression: "username_expression", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class PhaseNotEntitled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("PhaseNotEntitled", { code: S.Number, message: S.String, }), [{ code: 50002 }, { status: 400, message: { includes: "not entitled" } }], ) {} export class RulesetNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("RulesetNotFound", { code: S.Number, message: S.String, }), [{ code: 10003 }, { code: 10001 }], ) {} export interface RulesCreateRequestBodyBlockRulePositionBeforePosition { /** The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top. */ before?: string; } export const RulesCreateRequestBodyBlockRulePositionBeforePosition = /*@__PURE__*/ S.suspend(() => S.Struct({ before: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodyBlockRulePositionBeforePosition", }) as any as S.Schema; export interface RulesCreateRequestBodyBlockRulePositionAfterPosition { /** The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom. */ after?: string; } export const RulesCreateRequestBodyBlockRulePositionAfterPosition = /*@__PURE__*/ S.suspend(() => S.Struct({ after: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodyBlockRulePositionAfterPosition", }) as any as S.Schema; export interface RulesCreateRequestBodyBlockRulePositionIndexPosition { /** An index at which to place the rule, where index 1 is the first rule. */ index?: number; } export const RulesCreateRequestBodyBlockRulePositionIndexPosition = /*@__PURE__*/ S.suspend(() => S.Struct({ index: S.optional(S.Number), }), ).annotate({ identifier: "RulesCreateRequestBodyBlockRulePositionIndexPosition", }) as any as S.Schema; export type RulesCreateRequestBodyBlockRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyBlockRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyBlockRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyBlockRulePosition; } export const RulesCreateRequestBodyBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyBlockRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyBlockRule", }) as any as S.Schema; export type RulesCreateRequestBodyChallengeRuleAction = "challenge"; export const RulesCreateRequestBodyChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesCreateRequestBodyChallengeRuleCategoriesList = Array; export const RulesCreateRequestBodyChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodyChallengeRuleExposedCredentialCheck { /** An expression that selects the password used in the credentials check. */ passwordExpression: string; /** An expression that selects the user ID used in the credentials check. */ usernameExpression: string; } export const RulesCreateRequestBodyChallengeRuleExposedCredentialCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ passwordExpression: S.String.pipe(T.Body("password_expression")), usernameExpression: S.String.pipe(T.Body("username_expression")), }), ).annotate({ identifier: "RulesCreateRequestBodyChallengeRuleExposedCredentialCheck", }) as any as S.Schema; export interface RulesCreateRequestBodyChallengeRuleLogging { /** Whether to generate a log when the rule matches. */ enabled: boolean; } export const RulesCreateRequestBodyChallengeRuleLogging = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, }), ).annotate({ identifier: "RulesCreateRequestBodyChallengeRuleLogging", }) as any as S.Schema; export type RulesCreateRequestBodyChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyChallengeRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyChallengeRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesCreateRequestBodyChallengeRuleRatelimitCharacteristicsList = Array; export const RulesCreateRequestBodyChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodyChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateRequestBodyChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesCreateRequestBodyChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateRequestBodyChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateRequestBodyChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesCreateRequestBodyChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesCreateRequestBodyChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: RulesCreateRequestBodyChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyChallengeRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateRequestBodyChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesCreateRequestBodyChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesCreateRequestBodyChallengeRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(RulesCreateRequestBodyChallengeRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesCreateRequestBodyChallengeRulePosition), ratelimit: S.optional(RulesCreateRequestBodyChallengeRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodyChallengeRule", }) as any as S.Schema; export type RulesCreateRequestBodyResponseCompressionRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyResponseCompressionRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyResponseCompressionRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyResponseCompressionRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyResponseCompressionRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyResponseCompressionRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyResponseCompressionRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyResponseCompressionRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyResponseCompressionRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyResponseCompressionRulePosition; } export const RulesCreateRequestBodyResponseCompressionRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional( RulesCreateRequestBodyResponseCompressionRulePosition, ), }), ).annotate({ identifier: "RulesCreateRequestBodyResponseCompressionRule", }) as any as S.Schema; export type RulesCreateRequestBodyDDoSDynamicRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyDDoSDynamicRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyDDoSDynamicRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyDDoSDynamicRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyDDoSDynamicRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyDDoSDynamicRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyDDoSDynamicRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyDDoSDynamicRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyDDoSDynamicRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyDDoSDynamicRulePosition; } export const RulesCreateRequestBodyDDoSDynamicRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesCreateRequestBodyDDoSDynamicRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyDDoSDynamicRule", }) as any as S.Schema; export type RulesCreateRequestBodyExecuteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyExecuteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyExecuteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyExecuteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyExecuteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyExecuteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyExecuteRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyExecuteRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyExecuteRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyExecuteRulePosition; } export const RulesCreateRequestBodyExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyExecuteRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyExecuteRule", }) as any as S.Schema; export type RulesCreateRequestBodyForceConnectionCloseRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyForceConnectionCloseRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyForceConnectionCloseRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyForceConnectionCloseRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyForceConnectionCloseRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyForceConnectionCloseRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyForceConnectionCloseRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyForceConnectionCloseRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyForceConnectionCloseRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyForceConnectionCloseRulePosition; } export const RulesCreateRequestBodyForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional( RulesCreateRequestBodyForceConnectionCloseRulePosition, ), }), ).annotate({ identifier: "RulesCreateRequestBodyForceConnectionCloseRule", }) as any as S.Schema; export type RulesCreateRequestBodyJavaScriptChallengeRuleAction = "js_challenge"; export const RulesCreateRequestBodyJavaScriptChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesCreateRequestBodyJavaScriptChallengeRuleCategoriesList = Array; export const RulesCreateRequestBodyJavaScriptChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateRequestBodyJavaScriptChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateRequestBodyJavaScriptChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateRequestBodyJavaScriptChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyJavaScriptChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyJavaScriptChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyJavaScriptChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyJavaScriptChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyJavaScriptChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyJavaScriptChallengeRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyJavaScriptChallengeRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesCreateRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList = Array; export const RulesCreateRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodyJavaScriptChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesCreateRequestBodyJavaScriptChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateRequestBodyJavaScriptChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesCreateRequestBodyJavaScriptChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesCreateRequestBodyJavaScriptChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: RulesCreateRequestBodyJavaScriptChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyJavaScriptChallengeRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateRequestBodyJavaScriptChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesCreateRequestBodyJavaScriptChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesCreateRequestBodyJavaScriptChallengeRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( RulesCreateRequestBodyJavaScriptChallengeRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional( RulesCreateRequestBodyJavaScriptChallengeRulePosition, ), ratelimit: S.optional( RulesCreateRequestBodyJavaScriptChallengeRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodyJavaScriptChallengeRule", }) as any as S.Schema; export type RulesCreateRequestBodyLogRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyLogRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyLogRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyLogRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyLogRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyLogRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyLogRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyLogRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyLogRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyLogRulePosition; } export const RulesCreateRequestBodyLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyLogRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyLogRule", }) as any as S.Schema; export type RulesCreateRequestBodyLogCustomFieldRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyLogCustomFieldRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyLogCustomFieldRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyLogCustomFieldRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyLogCustomFieldRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyLogCustomFieldRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyLogCustomFieldRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyLogCustomFieldRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyLogCustomFieldRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyLogCustomFieldRulePosition; } export const RulesCreateRequestBodyLogCustomFieldRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesCreateRequestBodyLogCustomFieldRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyLogCustomFieldRule", }) as any as S.Schema; export type RulesCreateRequestBodyManagedChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyManagedChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyManagedChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyManagedChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyManagedChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyManagedChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyManagedChallengeRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyManagedChallengeRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyManagedChallengeRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyManagedChallengeRulePosition; } export const RulesCreateRequestBodyManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyManagedChallengeRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyManagedChallengeRule", }) as any as S.Schema; export type RulesCreateRequestBodyRedirectRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyRedirectRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyRedirectRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyRedirectRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyRedirectRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyRedirectRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyRedirectRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyRedirectRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyRedirectRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyRedirectRulePosition; } export const RulesCreateRequestBodyRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyRedirectRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyRedirectRule", }) as any as S.Schema; export type RulesCreateRequestBodyRewriteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyRewriteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyRewriteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyRewriteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyRewriteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyRewriteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyRewriteRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyRewriteRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyRewriteRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyRewriteRulePosition; } export const RulesCreateRequestBodyRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyRewriteRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyRewriteRule", }) as any as S.Schema; export type RulesCreateRequestBodyRouteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyRouteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyRouteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyRouteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyRouteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyRouteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyRouteRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyRouteRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyRouteRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyRouteRulePosition; } export const RulesCreateRequestBodyRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyRouteRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyRouteRule", }) as any as S.Schema; export type RulesCreateRequestBodyScoreRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyScoreRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyScoreRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyScoreRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyScoreRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyScoreRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyScoreRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyScoreRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyScoreRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyScoreRulePosition; } export const RulesCreateRequestBodyScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodyScoreRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyScoreRule", }) as any as S.Schema; export type RulesCreateRequestBodyServeErrorRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyServeErrorRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyServeErrorRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyServeErrorRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyServeErrorRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyServeErrorRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyServeErrorRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyServeErrorRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodyServeErrorRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyServeErrorRulePosition; } export const RulesCreateRequestBodyServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesCreateRequestBodyServeErrorRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodyServeErrorRule", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleAction = "set_cache_control"; export const RulesCreateRequestBodySetCacheControlRuleAction = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersImmutable = | RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAge = | RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidate = | RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstand = | RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList = Array; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoCache = | RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoStore = | RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransform = | RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList = Array; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersPrivate = | RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidate = | RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersPublic = | RulesCreateRequestBodySetCacheControlRuleActionParametersPublicSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxage = | RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfError = | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate = | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective | RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective; export const RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface RulesCreateRequestBodySetCacheControlRuleActionParameters { /** A cache-control directive configuration. */ immutable?: RulesCreateRequestBodySetCacheControlRuleActionParametersImmutable; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAge; /** A cache-control directive configuration. */ mustRevalidate?: RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidate; /** A cache-control directive configuration. */ mustUnderstand?: RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstand; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: RulesCreateRequestBodySetCacheControlRuleActionParametersNoCache; /** A cache-control directive configuration. */ noStore?: RulesCreateRequestBodySetCacheControlRuleActionParametersNoStore; /** A cache-control directive configuration. */ noTransform?: RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransform; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: RulesCreateRequestBodySetCacheControlRuleActionParametersPrivate; /** A cache-control directive configuration. */ proxyRevalidate?: RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidate; /** A cache-control directive configuration. */ public?: RulesCreateRequestBodySetCacheControlRuleActionParametersPublic; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxage; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfError; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate; } export const RulesCreateRequestBodySetCacheControlRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersImmutable, ), maxAge: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersMaxAge.pipe( T.Body("max-age"), ), ), mustRevalidate: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersMustRevalidate.pipe( T.Body("must-revalidate"), ), ), mustUnderstand: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersMustUnderstand.pipe( T.Body("must-understand"), ), ), noCache: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersNoCache.pipe( T.Body("no-cache"), ), ), noStore: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersNoStore.pipe( T.Body("no-store"), ), ), noTransform: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersNoTransform.pipe( T.Body("no-transform"), ), ), private: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersPrivate, ), proxyRevalidate: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersProxyRevalidate.pipe( T.Body("proxy-revalidate"), ), ), public: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersPublic, ), sMaxage: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersSMaxage.pipe( T.Body("s-maxage"), ), ), staleIfError: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersStaleIfError.pipe( T.Body("stale-if-error"), ), ), staleWhileRevalidate: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate.pipe( T.Body("stale-while-revalidate"), ), ), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleActionParameters", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleCategoriesList = Array; export const RulesCreateRequestBodySetCacheControlRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateRequestBodySetCacheControlRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateRequestBodySetCacheControlRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateRequestBodySetCacheControlRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodySetCacheControlRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodySetCacheControlRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodySetCacheControlRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodySetCacheControlRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetCacheControlRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodySetCacheControlRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetCacheControlRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesCreateRequestBodySetCacheControlRuleRatelimitCharacteristicsList = Array; export const RulesCreateRequestBodySetCacheControlRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheControlRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateRequestBodySetCacheControlRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesCreateRequestBodySetCacheControlRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateRequestBodySetCacheControlRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRuleRatelimit", }) as any as S.Schema; export interface RulesCreateRequestBodySetCacheControlRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesCreateRequestBodySetCacheControlRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodySetCacheControlRuleActionParameters; /** The categories of the rule. */ categories?: RulesCreateRequestBodySetCacheControlRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodySetCacheControlRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateRequestBodySetCacheControlRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesCreateRequestBodySetCacheControlRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesCreateRequestBodySetCacheControlRuleAction), actionParameters: S.optional( RulesCreateRequestBodySetCacheControlRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( RulesCreateRequestBodySetCacheControlRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesCreateRequestBodySetCacheControlRulePosition), ratelimit: S.optional(RulesCreateRequestBodySetCacheControlRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheControlRule", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheSettingsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodySetCacheSettingsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodySetCacheSettingsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodySetCacheSettingsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodySetCacheSettingsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetCacheSettingsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodySetCacheSettingsRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetCacheSettingsRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodySetCacheSettingsRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodySetCacheSettingsRulePosition; } export const RulesCreateRequestBodySetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodySetCacheSettingsRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheSettingsRule", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleAction = "set_cache_tags"; export const RulesCreateRequestBodySetCacheTagsRuleAction = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList = Array; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList; } export const RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation, values: RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation | (string & {}); } export const RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList = Array; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList; } export const RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation, values: RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation | (string & {}); } export const RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList = Array; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList; } export const RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation, values: RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation | (string & {}); } export const RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleActionParameters = | RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues | RulesCreateRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression | RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues | RulesCreateRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression | RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues | RulesCreateRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression; export const RulesCreateRequestBodySetCacheTagsRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type RulesCreateRequestBodySetCacheTagsRuleCategoriesList = Array; export const RulesCreateRequestBodySetCacheTagsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateRequestBodySetCacheTagsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateRequestBodySetCacheTagsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateRequestBodySetCacheTagsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodySetCacheTagsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodySetCacheTagsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodySetCacheTagsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodySetCacheTagsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetCacheTagsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodySetCacheTagsRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetCacheTagsRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesCreateRequestBodySetCacheTagsRuleRatelimitCharacteristicsList = Array; export const RulesCreateRequestBodySetCacheTagsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodySetCacheTagsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateRequestBodySetCacheTagsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesCreateRequestBodySetCacheTagsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateRequestBodySetCacheTagsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRuleRatelimit", }) as any as S.Schema; export interface RulesCreateRequestBodySetCacheTagsRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesCreateRequestBodySetCacheTagsRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodySetCacheTagsRuleActionParameters; /** The categories of the rule. */ categories?: RulesCreateRequestBodySetCacheTagsRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodySetCacheTagsRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateRequestBodySetCacheTagsRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesCreateRequestBodySetCacheTagsRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(RulesCreateRequestBodySetCacheTagsRuleAction), actionParameters: S.optional( RulesCreateRequestBodySetCacheTagsRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( RulesCreateRequestBodySetCacheTagsRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesCreateRequestBodySetCacheTagsRulePosition), ratelimit: S.optional(RulesCreateRequestBodySetCacheTagsRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodySetCacheTagsRule", }) as any as S.Schema; export type RulesCreateRequestBodySetConfigurationRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodySetConfigurationRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodySetConfigurationRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodySetConfigurationRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodySetConfigurationRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetConfigurationRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodySetConfigurationRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySetConfigurationRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodySetConfigurationRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodySetConfigurationRulePosition; } export const RulesCreateRequestBodySetConfigurationRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodySetConfigurationRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodySetConfigurationRule", }) as any as S.Schema; export type RulesCreateRequestBodySkipRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodySkipRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodySkipRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodySkipRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodySkipRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySkipRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodySkipRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodySkipRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesCreateRequestBodySkipRule { /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodySkipRulePosition; } export const RulesCreateRequestBodySkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesCreateRequestBodySkipRulePosition), }), ).annotate({ identifier: "RulesCreateRequestBodySkipRule", }) as any as S.Schema; export type RulesCreateRequestBodyTransformResponseHTMLRuleAction = "transform_response_html"; export const RulesCreateRequestBodyTransformResponseHTMLRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters { /** Enables the link maze transformation on the response. */ linkMaze: unknown; } export const RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ linkMaze: S.Unknown.pipe(T.Body("link_maze")), }), ).annotate({ identifier: "RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters", }) as any as S.Schema; export type RulesCreateRequestBodyTransformResponseHTMLRuleCategoriesList = Array; export const RulesCreateRequestBodyTransformResponseHTMLRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateRequestBodyTransformResponseHTMLRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateRequestBodyTransformResponseHTMLRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateRequestBodyTransformResponseHTMLRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesCreateRequestBodyTransformResponseHTMLRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesCreateRequestBodyTransformResponseHTMLRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesCreateRequestBodyTransformResponseHTMLRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesCreateRequestBodyTransformResponseHTMLRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyTransformResponseHTMLRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesCreateRequestBodyTransformResponseHTMLRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesCreateRequestBodyTransformResponseHTMLRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesCreateRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList = Array; export const RulesCreateRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestBodyTransformResponseHTMLRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesCreateRequestBodyTransformResponseHTMLRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateRequestBodyTransformResponseHTMLRuleRatelimit", }) as any as S.Schema; export interface RulesCreateRequestBodyTransformResponseHTMLRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: | RulesCreateRequestBodyTransformResponseHTMLRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; /** The categories of the rule. */ categories?: RulesCreateRequestBodyTransformResponseHTMLRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesCreateRequestBodyTransformResponseHTMLRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateRequestBodyTransformResponseHTMLRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesCreateRequestBodyTransformResponseHTMLRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesCreateRequestBodyTransformResponseHTMLRuleAction), actionParameters: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional( RulesCreateRequestBodyTransformResponseHTMLRulePosition, ), ratelimit: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesCreateRequestBodyTransformResponseHTMLRule", }) as any as S.Schema; export type RulesCreateRequestBody = | RulesCreateRequestBodyBlockRule | RulesCreateRequestBodyChallengeRule | RulesCreateRequestBodyResponseCompressionRule | RulesCreateRequestBodyDDoSDynamicRule | RulesCreateRequestBodyExecuteRule | RulesCreateRequestBodyForceConnectionCloseRule | RulesCreateRequestBodyJavaScriptChallengeRule | RulesCreateRequestBodyLogRule | RulesCreateRequestBodyLogCustomFieldRule | RulesCreateRequestBodyManagedChallengeRule | RulesCreateRequestBodyRedirectRule | RulesCreateRequestBodyRewriteRule | RulesCreateRequestBodyRouteRule | RulesCreateRequestBodyScoreRule | RulesCreateRequestBodyServeErrorRule | RulesCreateRequestBodySetCacheControlRule | RulesCreateRequestBodySetCacheSettingsRule | RulesCreateRequestBodySetCacheTagsRule | RulesCreateRequestBodySetConfigurationRule | RulesCreateRequestBodySkipRule | RulesCreateRequestBodyTransformResponseHTMLRule; export const RulesCreateRequestBody = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], ["position"], ["position"], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], ["position"], ["position"], ["position"], ["position"], ["position"], ["position"], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ]), ); export interface CreateRuleForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; body: RulesCreateRequestBody; } export const CreateRuleForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), body: RulesCreateRequestBody.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/rulesets/{ruleset_id}/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRuleForAccountRequest", }) as any as S.Schema; export type RulesCreateResponseKind = "managed" | "custom" | "root" | "zone"; export const RulesCreateResponseKind = /*@__PURE__*/ S.String; export type RulesCreateResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const RulesCreateResponsePhase = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemBlockRuleAction = "block"; export const RulesCreateResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemBlockRuleActionParametersResponse { /** The content to return. */ content: string; /** The type of the content to return. */ contentType: string; /** The status code to return. */ statusCode: number; } export const RulesCreateResponseRulesItemBlockRuleActionParametersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.String.pipe(T.Body("content_type")), statusCode: S.Number.pipe(T.Body("status_code")), }), ).annotate({ identifier: "RulesCreateResponseRulesItemBlockRuleActionParametersResponse", }) as any as S.Schema; export interface RulesCreateResponseRulesItemBlockRuleActionParameters { /** The response to show when the block is applied. */ response?: RulesCreateResponseRulesItemBlockRuleActionParametersResponse | null; } export const RulesCreateResponseRulesItemBlockRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ response: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParametersResponse), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemBlockRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemBlockRuleCategoriesList = Array; export const RulesCreateResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const RulesCreateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type RulesCreateResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesCreateResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemBlockRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemChallengeAction = "challenge"; export const RulesCreateResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemChallengeCategoriesList = Array; export const RulesCreateResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesCreateResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemChallenge", }) as any as S.Schema; export type RulesCreateResponseRulesItemCompressResponseRuleAction = "compress_response"; export const RulesCreateResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface RulesCreateResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const RulesCreateResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: RulesCreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "RulesCreateResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemCompressResponseRuleCategoriesList = Array; export const RulesCreateResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( RulesCreateResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesCreateResponseRulesItemCompressResponseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const RulesCreateResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const RulesCreateResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleAction = "execute"; export const RulesCreateResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData { /** The public key to encrypt matched data logs with. */ publicKey: string; } export const RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData = /*@__PURE__*/ S.suspend(() => S.Struct({ publicKey: S.String.pipe(T.Body("public_key")), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData", }) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const RulesCreateResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface RulesCreateResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: RulesCreateResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const RulesCreateResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleCategoriesList = Array; export const RulesCreateResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemExecuteRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemExecuteRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const RulesCreateResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const RulesCreateResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesCreateResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemJSChallengeAction = "js_challenge"; export const RulesCreateResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemJSChallengeCategoriesList = Array; export const RulesCreateResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemJSChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemJSChallenge", }) as any as S.Schema; export type RulesCreateResponseRulesItemLogRuleAction = "log"; export const RulesCreateResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemLogRuleCategoriesList = Array; export const RulesCreateResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesCreateResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemLogRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const RulesCreateResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem { /** The name of the cookie. */ name: string; } export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export interface RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem { /** The name of the response header. */ name: string; /** Whether to log duplicate values of the same header. */ preserveDuplicates?: boolean | null; } export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, preserveDuplicates: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_duplicates")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export interface RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem { /** The name of the header. */ name: string; } export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface RulesCreateResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const RulesCreateResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( RulesCreateResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const RulesCreateResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const RulesCreateResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesCreateResponseRulesItemManagedChallengeRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemRedirectRuleAction = "redirect"; export const RulesCreateResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRedirectRuleActionParametersFromList { /** An expression that evaluates to the list lookup key. */ key: string; /** The name of the list to match against. */ name: string; } export const RulesCreateResponseRulesItemRedirectRuleActionParametersFromList = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, name: S.String, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRedirectRuleActionParametersFromList", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl { /** An expression that evaluates to a URL to redirect the request to. */ expression?: string | null; /** A URL to redirect the request to. */ value?: string | null; } export const RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.optional(S.NullOr(S.String)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl", }) as any as S.Schema; export type RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface RulesCreateResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const RulesCreateResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const RulesCreateResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemRedirectRuleCategoriesList = Array; export const RulesCreateResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRedirectRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleAction = "rewrite"; export const RulesCreateResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleActionParametersHeaders = | RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | RulesCreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const RulesCreateResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export interface RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath { /** An expression that evaluates to a value to rewrite the URI path to. */ expression?: string | null; /** A value to rewrite the URI path to. */ value?: string | null; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.optional(S.NullOr(S.String)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath { /** A URI path rewrite. */ path: RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; /** Whether to propagate the rewritten URI to origin. */ origin?: boolean | null; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath = /*@__PURE__*/ S.suspend(() => S.Struct({ path: RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath, origin: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery { /** An expression that evaluates to a value to rewrite the URI query to. */ expression?: string | null; /** A value to rewrite the URI query to. */ value?: string | null; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.optional(S.NullOr(S.String)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery { /** A URI query rewrite. */ query: RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; /** Whether to propagate the rewritten URI to origin. */ origin?: boolean | null; } export const RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery = /*@__PURE__*/ S.suspend(() => S.Struct({ query: RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery, origin: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const RulesCreateResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface RulesCreateResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: RulesCreateResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: RulesCreateResponseRulesItemRewriteRuleActionParametersUri | null; } export const RulesCreateResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr( RulesCreateResponseRulesItemRewriteRuleActionParametersHeaders, ), ), uri: S.optional( S.NullOr(RulesCreateResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleCategoriesList = Array; export const RulesCreateResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemRewriteRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRewriteRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemRouteRuleAction = "route"; export const RulesCreateResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemRouteRuleActionParametersOrigin { /** A resolved host to route to. */ host?: string | null; /** A destination port to route to. */ port?: number | null; } export const RulesCreateResponseRulesItemRouteRuleActionParametersOrigin = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional(S.NullOr(S.String)), port: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRouteRuleActionParametersOrigin", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRouteRuleActionParametersSni { /** A value to override the SNI to. */ value: string; } export const RulesCreateResponseRulesItemRouteRuleActionParametersSni = /*@__PURE__*/ S.suspend(() => S.Struct({ value: S.String, }), ).annotate({ identifier: "RulesCreateResponseRulesItemRouteRuleActionParametersSni", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRouteRuleActionParameters { /** A value to rewrite the HTTP host header to. */ hostHeader?: string | null; /** An origin to route to. */ origin?: RulesCreateResponseRulesItemRouteRuleActionParametersOrigin | null; /** A Server Name Indication (SNI) override. */ sni?: RulesCreateResponseRulesItemRouteRuleActionParametersSni | null; } export const RulesCreateResponseRulesItemRouteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ hostHeader: S.optional(S.NullOr(S.String).pipe(T.Body("host_header"))), origin: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParametersOrigin), ), sni: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParametersSni), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRouteRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemRouteRuleCategoriesList = Array; export const RulesCreateResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesCreateResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemRouteRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemScoreRuleAction = "score"; export const RulesCreateResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemScoreRuleActionParameters { /** A delta to change the score by, which can be either positive or negative. */ increment: number; } export const RulesCreateResponseRulesItemScoreRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ increment: S.Number, }), ).annotate({ identifier: "RulesCreateResponseRulesItemScoreRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemScoreRuleCategoriesList = Array; export const RulesCreateResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesCreateResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemScoreRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemServeErrorRuleAction = "serve_error"; export const RulesCreateResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type RulesCreateResponseRulesItemServeErrorRuleActionParameters = | RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent | RulesCreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const RulesCreateResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type RulesCreateResponseRulesItemServeErrorRuleCategoriesList = Array; export const RulesCreateResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr( RulesCreateResponseRulesItemServeErrorRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemServeErrorRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlAction = "set_cache_control"; export const RulesCreateResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersImmutable = | RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAge = | RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidate = | RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstand = | RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoCache = | RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoStore = | RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransform = | RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersPrivate = | RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersPublic = | RulesCreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxage = | RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfError = | RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface RulesCreateResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: RulesCreateResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: RulesCreateResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: RulesCreateResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: RulesCreateResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: RulesCreateResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const RulesCreateResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlCategoriesList = Array; export const RulesCreateResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheControl", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const RulesCreateResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost { /** Whether to use the resolved host in the cache key. */ resolved?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = /*@__PURE__*/ S.suspend(() => S.Struct({ resolved: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser { /** Whether to use the user agent's device type in the cache key. */ deviceType?: boolean | null; /** Whether to use the user agents's country in the cache key. */ geo?: boolean | null; /** Whether to use the user agent's language in the cache key. */ lang?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = /*@__PURE__*/ S.suspend(() => S.Struct({ deviceType: S.optional(S.NullOr(S.Boolean).pipe(T.Body("device_type"))), geo: S.optional(S.NullOr(S.Boolean)), lang: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve { /** Whether Cache Reserve is enabled. If this is true and a request meets eligibility criteria, Cloudflare will write the resource to Cache Reserve. */ eligible: boolean; /** The minimum file size eligible for storage in Cache Reserve. */ minimumFileSize?: number | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = /*@__PURE__*/ S.suspend(() => S.Struct({ eligible: S.Boolean, minimumFileSize: S.optional( S.NullOr(S.Number).pipe(T.Body("minimum_file_size")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange { /** The lower bound of the range. */ from?: number | null; /** The upper bound of the range. */ to?: number | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = /*@__PURE__*/ S.suspend(() => S.Struct({ from: S.optional(S.NullOr(S.Number)), to: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem { /** The time to cache the response for (in seconds). A value of 0 is equivalent to setting the cache control header with the value "no-cache". A value of -1 is equivalent to setting the cache control header with the value of "no-store". */ value: number; /** A single status code to apply the TTL to. */ statusCode?: number | null; /** A range of status codes to apply the TTL to. */ statusCodeRange?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = /*@__PURE__*/ S.suspend(() => S.Struct({ value: S.Number, statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), statusCodeRange: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange, ).pipe(T.Body("status_code_range")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale { /** Whether Cloudflare should disable serving stale content while getting the latest content from the origin. */ disableStaleWhileUpdating?: boolean | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = /*@__PURE__*/ S.suspend(() => S.Struct({ disableStaleWhileUpdating: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_stale_while_updating")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary { /** URL pattern for the Use-As-Dictionary match field. This pattern specifies which URLs can use this response as a dictionary. */ matchPattern: string; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = /*@__PURE__*/ S.suspend(() => S.Struct({ matchPattern: S.String.pipe(T.Body("match_pattern")), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const RulesCreateResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsActionParameters = | RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | RulesCreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | RulesCreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | RulesCreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const RulesCreateResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type RulesCreateResponseRulesItemSetCacheTagsCategoriesList = Array; export const RulesCreateResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetCacheTags", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetConfigRuleAction = "set_config"; export const RulesCreateResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify { /** Whether to minify CSS files. */ css?: boolean | null; /** Whether to minify HTML files. */ html?: boolean | null; /** Whether to minify JavaScript files. */ js?: boolean | null; } export const RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify = /*@__PURE__*/ S.suspend(() => S.Struct({ css: S.optional(S.NullOr(S.Boolean)), html: S.optional(S.NullOr(S.Boolean)), js: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const RulesCreateResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const RulesCreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const RulesCreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const RulesCreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const RulesCreateResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface RulesCreateResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: RulesCreateResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: RulesCreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: RulesCreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: RulesCreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: RulesCreateResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const RulesCreateResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersPolish, ), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(RulesCreateResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemSetConfigRuleCategoriesList = Array; export const RulesCreateResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSetConfigRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleAction = "skip"; export const RulesCreateResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSkipRuleActionParametersPhase = "current"; export const RulesCreateResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const RulesCreateResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const RulesCreateResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const RulesCreateResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSkipRuleActionParametersProductsList = Array; export const RulesCreateResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const RulesCreateResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | RulesCreateResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const RulesCreateResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, RulesCreateResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const RulesCreateResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const RulesCreateResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: RulesCreateResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: RulesCreateResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: RulesCreateResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: RulesCreateResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: RulesCreateResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: RulesCreateResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const RulesCreateResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(RulesCreateResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr( RulesCreateResponseRulesItemSkipRuleActionParametersPhasesList, ), ), products: S.optional( S.NullOr( RulesCreateResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr(RulesCreateResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(RulesCreateResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr( RulesCreateResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleCategoriesList = Array; export const RulesCreateResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesCreateResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesCreateResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemSkipRule", }) as any as S.Schema; export type RulesCreateResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const RulesCreateResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type RulesCreateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const RulesCreateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type RulesCreateResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const RulesCreateResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesCreateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesCreateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesCreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const RulesCreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesCreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesCreateResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesCreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesCreateResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface RulesCreateResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesCreateResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesCreateResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesCreateResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesCreateResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesCreateResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesCreateResponseRulesItemTransformResponseHTMLCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesCreateResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesCreateResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type RulesCreateResponseRulesItem = | RulesCreateResponseRulesItemBlockRule | RulesCreateResponseRulesItemChallenge | RulesCreateResponseRulesItemCompressResponseRule | RulesCreateResponseRulesItemDDoSDynamicRule | RulesCreateResponseRulesItemExecuteRule | RulesCreateResponseRulesItemForceConnectionCloseRule | RulesCreateResponseRulesItemJSChallenge | RulesCreateResponseRulesItemLogRule | RulesCreateResponseRulesItemLogCustomFieldRule | RulesCreateResponseRulesItemManagedChallengeRule | RulesCreateResponseRulesItemRedirectRule | RulesCreateResponseRulesItemRewriteRule | RulesCreateResponseRulesItemRouteRule | RulesCreateResponseRulesItemScoreRule | RulesCreateResponseRulesItemServeErrorRule | RulesCreateResponseRulesItemSetCacheControl | RulesCreateResponseRulesItemSetCacheSettingsRule | RulesCreateResponseRulesItemSetCacheTags | RulesCreateResponseRulesItemSetConfigRule | RulesCreateResponseRulesItemSkipRule | RulesCreateResponseRulesItemTransformResponseHTML; export const RulesCreateResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type RulesCreateResponseRulesList = Array; export const RulesCreateResponseRulesList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateRuleResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: RulesCreateResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: RulesCreateResponsePhase; /** The list of rules in the ruleset. */ rules: RulesCreateResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const CreateRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: RulesCreateResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: RulesCreateResponsePhase, rules: RulesCreateResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRuleResponse", }) as any as S.Schema; export interface CreateRuleForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; body: RulesCreateRequestBody; } export const CreateRuleForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), body: RulesCreateRequestBody.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/rulesets/{ruleset_id}/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRuleForZoneRequest", }) as any as S.Schema; export type CreateRequestKind = "managed" | "custom" | "root" | "zone"; export const CreateRequestKind = /*@__PURE__*/ S.String; export type CreateRequestPhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const CreateRequestPhase = /*@__PURE__*/ S.String; export type CreateRequestRulesItemBlockRuleAction = "block"; export const CreateRequestRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const CreateRequestRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export interface CreateRequestRulesItemBlockRuleActionParameters { /** The response to show when the block is applied. */ response?: RulesCreateResponseRulesItemBlockRuleActionParametersResponse; } export const CreateRequestRulesItemBlockRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ response: S.optional( RulesCreateResponseRulesItemBlockRuleActionParametersResponse, ), }), ).annotate({ identifier: "CreateRequestRulesItemBlockRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemBlockRuleCategoriesList = Array; export const CreateRequestRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const CreateRequestRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type CreateRequestRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateRequestRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemBlockRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemBlockRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemBlockRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemBlockRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemBlockRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemBlockRuleAction), actionParameters: S.optional( CreateRequestRulesItemBlockRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemBlockRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemBlockRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemBlockRule", }) as any as S.Schema; export type CreateRequestRulesItemChallengeAction = "challenge"; export const CreateRequestRulesItemChallengeAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemChallengeCategoriesList = Array; export const CreateRequestRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemChallengeRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateRequestRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemChallengeRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemChallenge { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemChallengeAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: CreateRequestRulesItemChallengeCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemChallengeRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemChallengeAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(CreateRequestRulesItemChallengeCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemChallengeRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemChallenge", }) as any as S.Schema; export type CreateRequestRulesItemCompressResponseRuleAction = "compress_response"; export const CreateRequestRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: | CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | (string & {}); } export const CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), }), ).annotate({ identifier: "CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface CreateRequestRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const CreateRequestRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: CreateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "CreateRequestRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemCompressResponseRuleCategoriesList = Array; export const CreateRequestRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemCompressResponseRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemCompressResponseRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemCompressResponseRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemCompressResponseRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemCompressResponseRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemCompressResponseRuleAction), actionParameters: S.optional( CreateRequestRulesItemCompressResponseRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( CreateRequestRulesItemCompressResponseRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( CreateRequestRulesItemCompressResponseRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemCompressResponseRule", }) as any as S.Schema; export type CreateRequestRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const CreateRequestRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemDDoSDynamicRuleCategoriesList = Array; export const CreateRequestRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemDDoSDynamicRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemDDoSDynamicRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: CreateRequestRulesItemDDoSDynamicRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemDDoSDynamicRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemDDoSDynamicRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( CreateRequestRulesItemDDoSDynamicRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemDDoSDynamicRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemDDoSDynamicRule", }) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleAction = "execute"; export const CreateRequestRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const CreateRequestRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string; /** Whether to enable execution of rules in the category. */ enabled?: boolean; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: | CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | (string & {}); } export const CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.String), enabled: S.optional(S.Boolean), sensitivityLevel: S.optional( CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string; /** Whether to enable execution of the rule. */ enabled?: boolean; /** The score threshold to use for the rule. */ scoreThreshold?: number; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: | CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | (string & {}); } export const CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.String), enabled: S.optional(S.Boolean), scoreThreshold: S.optional(S.Number.pipe(T.Body("score_threshold"))), sensitivityLevel: S.optional( CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const CreateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesList; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: | CreateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | (string & {}); } export const CreateRequestRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.String), categories: S.optional( CreateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), enabled: S.optional(S.Boolean), rules: S.optional( CreateRequestRulesItemExecuteRuleActionParametersOverridesRulesList, ), sensitivityLevel: S.optional( CreateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface CreateRequestRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; /** A set of overrides to apply to the target ruleset. */ overrides?: CreateRequestRulesItemExecuteRuleActionParametersOverrides; } export const CreateRequestRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData.pipe( T.Body("matched_data"), ), ), overrides: S.optional( CreateRequestRulesItemExecuteRuleActionParametersOverrides, ), }), ).annotate({ identifier: "CreateRequestRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleCategoriesList = Array; export const CreateRequestRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemExecuteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemExecuteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemExecuteRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemExecuteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemExecuteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemExecuteRuleAction), actionParameters: S.optional( CreateRequestRulesItemExecuteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemExecuteRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemExecuteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemExecuteRule", }) as any as S.Schema; export type CreateRequestRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const CreateRequestRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemForceConnectionCloseRuleCategoriesList = Array; export const CreateRequestRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemForceConnectionCloseRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemForceConnectionCloseRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: CreateRequestRulesItemForceConnectionCloseRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemForceConnectionCloseRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemForceConnectionCloseRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( CreateRequestRulesItemForceConnectionCloseRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( CreateRequestRulesItemForceConnectionCloseRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type CreateRequestRulesItemJSChallengeAction = "js_challenge"; export const CreateRequestRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemJSChallengeCategoriesList = Array; export const CreateRequestRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemJSChallenge { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemJSChallengeAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: CreateRequestRulesItemJSChallengeCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemJSChallengeRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemJSChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemJSChallengeAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(CreateRequestRulesItemJSChallengeCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemJSChallengeRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemJSChallenge", }) as any as S.Schema; export type CreateRequestRulesItemLogRuleAction = "log"; export const CreateRequestRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemLogRuleCategoriesList = Array; export const CreateRequestRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemLogRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateRequestRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemLogRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemLogRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: CreateRequestRulesItemLogRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemLogRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemLogRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(CreateRequestRulesItemLogRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemLogRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemLogRule", }) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const CreateRequestRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export interface CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem { /** The name of the response header. */ name: string; /** Whether to log duplicate values of the same header. */ preserveDuplicates?: boolean; } export const CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, preserveDuplicates: S.optional( S.Boolean.pipe(T.Body("preserve_duplicates")), ), }), ).annotate({ identifier: "CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem", }) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type CreateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const CreateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface CreateRequestRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: CreateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList; /** The raw response fields to log. */ rawResponseFields?: CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList; /** The raw request fields to log. */ requestFields?: CreateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList; /** The transformed response fields to log. */ responseFields?: CreateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList; /** The transformed request fields to log. */ transformedRequestFields?: CreateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList; } export const CreateRequestRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( CreateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList.pipe( T.Body("cookie_fields"), ), ), rawResponseFields: S.optional( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList.pipe( T.Body("raw_response_fields"), ), ), requestFields: S.optional( CreateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList.pipe( T.Body("request_fields"), ), ), responseFields: S.optional( CreateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList.pipe( T.Body("response_fields"), ), ), transformedRequestFields: S.optional( CreateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList.pipe( T.Body("transformed_request_fields"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleCategoriesList = Array; export const CreateRequestRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemLogCustomFieldRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemLogCustomFieldRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemLogCustomFieldRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemLogCustomFieldRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemLogCustomFieldRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemLogCustomFieldRuleAction), actionParameters: S.optional( CreateRequestRulesItemLogCustomFieldRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( CreateRequestRulesItemLogCustomFieldRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemLogCustomFieldRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemLogCustomFieldRule", }) as any as S.Schema; export type CreateRequestRulesItemManagedChallengeRuleAction = "managed_challenge"; export const CreateRequestRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemManagedChallengeRuleCategoriesList = Array; export const CreateRequestRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemManagedChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemManagedChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: CreateRequestRulesItemManagedChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemManagedChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemManagedChallengeRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( CreateRequestRulesItemManagedChallengeRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( CreateRequestRulesItemManagedChallengeRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemManagedChallengeRule", }) as any as S.Schema; export type CreateRequestRulesItemRedirectRuleAction = "redirect"; export const CreateRequestRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const CreateRequestRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export interface CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl { /** An expression that evaluates to a URL to redirect the request to. */ expression?: string; /** A URL to redirect the request to. */ value?: string; } export const CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.optional(S.String), value: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl", }) as any as S.Schema; export type CreateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const CreateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface CreateRequestRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean; /** The status code to use for the redirect. */ statusCode?: | CreateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode | (number & {}); } export const CreateRequestRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.Boolean.pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( CreateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode.pipe( T.Body("status_code"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface CreateRequestRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; /** A redirect based on the request properties. */ fromValue?: CreateRequestRulesItemRedirectRuleActionParametersFromValue; } export const CreateRequestRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList.pipe( T.Body("from_list"), ), ), fromValue: S.optional( CreateRequestRulesItemRedirectRuleActionParametersFromValue.pipe( T.Body("from_value"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemRedirectRuleCategoriesList = Array; export const CreateRequestRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemRedirectRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemRedirectRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemRedirectRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemRedirectRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemRedirectRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemRedirectRuleAction), actionParameters: S.optional( CreateRequestRulesItemRedirectRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemRedirectRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemRedirectRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemRedirectRule", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleAction = "rewrite"; export const CreateRequestRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleActionParametersHeaders = | CreateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | CreateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | CreateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | CreateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | CreateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const CreateRequestRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export interface CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath { /** An expression that evaluates to a value to rewrite the URI path to. */ expression?: string; /** A value to rewrite the URI path to. */ value?: string; } export const CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.optional(S.String), value: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath", }) as any as S.Schema; export interface CreateRequestRulesItemRewriteRuleActionParametersUriURIPath { /** A URI path rewrite. */ path: CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath; /** Whether to propagate the rewritten URI to origin. */ origin?: boolean; } export const CreateRequestRulesItemRewriteRuleActionParametersUriURIPath = /*@__PURE__*/ S.suspend(() => S.Struct({ path: CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath, origin: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersUriURIPath", }) as any as S.Schema; export interface CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery { /** An expression that evaluates to a value to rewrite the URI query to. */ expression?: string; /** A value to rewrite the URI query to. */ value?: string; } export const CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.optional(S.String), value: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery", }) as any as S.Schema; export interface CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery { /** A URI query rewrite. */ query: CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery; /** Whether to propagate the rewritten URI to origin. */ origin?: boolean; } export const CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery = /*@__PURE__*/ S.suspend(() => S.Struct({ query: CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery, origin: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleActionParametersUri = | CreateRequestRulesItemRewriteRuleActionParametersUriURIPath | CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export const CreateRequestRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface CreateRequestRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: CreateRequestRulesItemRewriteRuleActionParametersHeaders; /** A URI path rewrite. */ uri?: CreateRequestRulesItemRewriteRuleActionParametersUri; } export const CreateRequestRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( CreateRequestRulesItemRewriteRuleActionParametersHeaders, ), uri: S.optional(CreateRequestRulesItemRewriteRuleActionParametersUri), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleCategoriesList = Array; export const CreateRequestRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemRewriteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemRewriteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemRewriteRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemRewriteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemRewriteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemRewriteRuleAction), actionParameters: S.optional( CreateRequestRulesItemRewriteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemRewriteRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemRewriteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemRewriteRule", }) as any as S.Schema; export type CreateRequestRulesItemRouteRuleAction = "route"; export const CreateRequestRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemRouteRuleActionParametersOrigin { /** A resolved host to route to. */ host?: string; /** A destination port to route to. */ port?: number; } export const CreateRequestRulesItemRouteRuleActionParametersOrigin = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional(S.String), port: S.optional(S.Number), }), ).annotate({ identifier: "CreateRequestRulesItemRouteRuleActionParametersOrigin", }) as any as S.Schema; export type CreateRequestRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const CreateRequestRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export interface CreateRequestRulesItemRouteRuleActionParameters { /** A value to rewrite the HTTP host header to. */ hostHeader?: string; /** An origin to route to. */ origin?: CreateRequestRulesItemRouteRuleActionParametersOrigin; /** A Server Name Indication (SNI) override. */ sni?: RulesCreateResponseRulesItemRouteRuleActionParametersSni; } export const CreateRequestRulesItemRouteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ hostHeader: S.optional(S.String.pipe(T.Body("host_header"))), origin: S.optional(CreateRequestRulesItemRouteRuleActionParametersOrigin), sni: S.optional(RulesCreateResponseRulesItemRouteRuleActionParametersSni), }), ).annotate({ identifier: "CreateRequestRulesItemRouteRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemRouteRuleCategoriesList = Array; export const CreateRequestRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateRequestRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemRouteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemRouteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemRouteRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemRouteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemRouteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemRouteRuleAction), actionParameters: S.optional( CreateRequestRulesItemRouteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemRouteRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemRouteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemRouteRule", }) as any as S.Schema; export type CreateRequestRulesItemScoreRuleAction = "score"; export const CreateRequestRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const CreateRequestRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type CreateRequestRulesItemScoreRuleCategoriesList = Array; export const CreateRequestRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateRequestRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemScoreRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemScoreRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemScoreRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemScoreRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemScoreRuleAction), actionParameters: S.optional( RulesCreateResponseRulesItemScoreRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemScoreRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemScoreRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemScoreRule", }) as any as S.Schema; export type CreateRequestRulesItemServeErrorRuleAction = "serve_error"; export const CreateRequestRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: | CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType | (string & {}); /** The status code to use for the error. */ statusCode?: number; } export const CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType.pipe( T.Body("content_type"), ), ), statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), }), ).annotate({ identifier: "CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: | CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | (string & {}); /** The status code to use for the error. */ statusCode?: number; } export const CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType.pipe( T.Body("content_type"), ), ), statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), }), ).annotate({ identifier: "CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type CreateRequestRulesItemServeErrorRuleActionParameters = | CreateRequestRulesItemServeErrorRuleActionParametersActionParametersContent | CreateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset; export const CreateRequestRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type CreateRequestRulesItemServeErrorRuleCategoriesList = Array; export const CreateRequestRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemServeErrorRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemServeErrorRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemServeErrorRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemServeErrorRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemServeErrorRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemServeErrorRuleAction), actionParameters: S.optional( CreateRequestRulesItemServeErrorRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( CreateRequestRulesItemServeErrorRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemServeErrorRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemServeErrorRule", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlAction = "set_cache_control"; export const CreateRequestRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersImmutable = | CreateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective | CreateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersMaxAge = | CreateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective | CreateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersMustRevalidate = | CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | CreateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersMustUnderstand = | CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | CreateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList; } export const CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersNoCache = | CreateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective | CreateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersNoStore = | CreateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective | CreateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersNoTransform = | CreateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective | CreateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList; } export const CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersPrivate = | CreateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective | CreateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidate = | CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersPublic = | CreateRequestRulesItemSetCacheControlActionParametersPublicSetDirective | CreateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersSMaxage = | CreateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective | CreateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersStaleIfError = | CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | CreateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface CreateRequestRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: CreateRequestRulesItemSetCacheControlActionParametersImmutable; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: CreateRequestRulesItemSetCacheControlActionParametersMaxAge; /** A cache-control directive configuration. */ mustRevalidate?: CreateRequestRulesItemSetCacheControlActionParametersMustRevalidate; /** A cache-control directive configuration. */ mustUnderstand?: CreateRequestRulesItemSetCacheControlActionParametersMustUnderstand; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: CreateRequestRulesItemSetCacheControlActionParametersNoCache; /** A cache-control directive configuration. */ noStore?: CreateRequestRulesItemSetCacheControlActionParametersNoStore; /** A cache-control directive configuration. */ noTransform?: CreateRequestRulesItemSetCacheControlActionParametersNoTransform; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: CreateRequestRulesItemSetCacheControlActionParametersPrivate; /** A cache-control directive configuration. */ proxyRevalidate?: CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidate; /** A cache-control directive configuration. */ public?: CreateRequestRulesItemSetCacheControlActionParametersPublic; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: CreateRequestRulesItemSetCacheControlActionParametersSMaxage; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: CreateRequestRulesItemSetCacheControlActionParametersStaleIfError; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate; } export const CreateRequestRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( CreateRequestRulesItemSetCacheControlActionParametersImmutable, ), maxAge: S.optional( CreateRequestRulesItemSetCacheControlActionParametersMaxAge.pipe( T.Body("max-age"), ), ), mustRevalidate: S.optional( CreateRequestRulesItemSetCacheControlActionParametersMustRevalidate.pipe( T.Body("must-revalidate"), ), ), mustUnderstand: S.optional( CreateRequestRulesItemSetCacheControlActionParametersMustUnderstand.pipe( T.Body("must-understand"), ), ), noCache: S.optional( CreateRequestRulesItemSetCacheControlActionParametersNoCache.pipe( T.Body("no-cache"), ), ), noStore: S.optional( CreateRequestRulesItemSetCacheControlActionParametersNoStore.pipe( T.Body("no-store"), ), ), noTransform: S.optional( CreateRequestRulesItemSetCacheControlActionParametersNoTransform.pipe( T.Body("no-transform"), ), ), private: S.optional( CreateRequestRulesItemSetCacheControlActionParametersPrivate, ), proxyRevalidate: S.optional( CreateRequestRulesItemSetCacheControlActionParametersProxyRevalidate.pipe( T.Body("proxy-revalidate"), ), ), public: S.optional( CreateRequestRulesItemSetCacheControlActionParametersPublic, ), sMaxage: S.optional( CreateRequestRulesItemSetCacheControlActionParametersSMaxage.pipe( T.Body("s-maxage"), ), ), staleIfError: S.optional( CreateRequestRulesItemSetCacheControlActionParametersStaleIfError.pipe( T.Body("stale-if-error"), ), ), staleWhileRevalidate: S.optional( CreateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate.pipe( T.Body("stale-while-revalidate"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlCategoriesList = Array; export const CreateRequestRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheControl { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemSetCacheControlAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemSetCacheControlActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemSetCacheControlCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemSetCacheControlRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemSetCacheControl = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemSetCacheControlAction), actionParameters: S.optional( CreateRequestRulesItemSetCacheControlActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( CreateRequestRulesItemSetCacheControlCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemSetCacheControlRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheControl", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const CreateRequestRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: | CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode | (string & {}); /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.Number), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList; /** A list of cookies to include in the cache key. */ include?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList.pipe( T.Body("check_presence"), ), ), include: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean; /** A list of headers to include in the cache key. */ include?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList.pipe( T.Body("check_presence"), ), ), contains: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), excludeOrigin: S.optional(S.Boolean.pipe(T.Body("exclude_origin"))), include: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost { /** Whether to use the resolved host in the cache key. */ resolved?: boolean; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = /*@__PURE__*/ S.suspend(() => S.Struct({ resolved: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean; /** A list of query string parameters to exclude from the cache key. */ list?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.Boolean), list: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean; /** A list of query string parameters to include in the cache key. */ list?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.Boolean), list: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude; /** Which query string parameters to include in the cache key. */ include?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), include: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser { /** Whether to use the user agent's device type in the cache key. */ deviceType?: boolean; /** Whether to use the user agents's country in the cache key. */ geo?: boolean; /** Whether to use the user agent's language in the cache key. */ lang?: boolean; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = /*@__PURE__*/ S.suspend(() => S.Struct({ deviceType: S.optional(S.Boolean.pipe(T.Body("device_type"))), geo: S.optional(S.Boolean), lang: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie; /** Which headers to include in the cache key. */ header?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader; /** How to use the host in the cache key. */ host?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString; /** How to use characteristics of the request user agent in the cache key. */ user?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), header: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), host: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), queryString: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString.pipe( T.Body("query_string"), ), ), user: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean; /** Which components of the request are included or excluded from the cache key. */ customKey?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.Boolean.pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.Boolean.pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey.pipe( T.Body("custom_key"), ), ), ignoreQueryStringsOrder: S.optional( S.Boolean.pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve { /** Whether Cache Reserve is enabled. If this is true and a request meets eligibility criteria, Cloudflare will write the resource to Cache Reserve. */ eligible: boolean; /** The minimum file size eligible for storage in Cache Reserve. */ minimumFileSize?: number; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve = /*@__PURE__*/ S.suspend(() => S.Struct({ eligible: S.Boolean, minimumFileSize: S.optional(S.Number.pipe(T.Body("minimum_file_size"))), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange { /** The lower bound of the range. */ from?: number; /** The upper bound of the range. */ to?: number; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = /*@__PURE__*/ S.suspend(() => S.Struct({ from: S.optional(S.Number), to: S.optional(S.Number), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem { /** The time to cache the response for (in seconds). A value of 0 is equivalent to setting the cache control header with the value "no-cache". A value of -1 is equivalent to setting the cache control header with the value of "no-store". */ value: number; /** A single status code to apply the TTL to. */ statusCode?: number; /** A range of status codes to apply the TTL to. */ statusCodeRange?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = /*@__PURE__*/ S.suspend(() => S.Struct({ value: S.Number, statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), statusCodeRange: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange.pipe( T.Body("status_code_range"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: | CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode | (string & {}); /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.Number), statusCodeTtl: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList.pipe( T.Body("status_code_ttl"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale { /** Whether Cloudflare should disable serving stale content while getting the latest content from the origin. */ disableStaleWhileUpdating?: boolean; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale = /*@__PURE__*/ S.suspend(() => S.Struct({ disableStaleWhileUpdating: S.optional( S.Boolean.pipe(T.Body("disable_stale_while_updating")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: | CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction | (string & {}); } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: | CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction | (string & {}); /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), mediaTypes: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList.pipe( T.Body("media_types"), ), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault; /** A mapping of lowercase request header names to their vary configuration. */ headers?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), headers: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean; /** When to serve stale content from cache. */ serveStale?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersVary; } export const CreateRequestRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList.pipe( T.Body("additional_cacheable_ports"), ), ), browserTtl: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl.pipe( T.Body("browser_ttl"), ), ), cache: S.optional(S.Boolean), cacheKey: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey.pipe( T.Body("cache_key"), ), ), cacheReserve: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve.pipe( T.Body("cache_reserve"), ), ), edgeTtl: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl.pipe( T.Body("edge_ttl"), ), ), originCacheControl: S.optional( S.Boolean.pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.Boolean.pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.Number.pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.Boolean.pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale.pipe( T.Body("serve_stale"), ), ), sharedDictionary: S.optional( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary.pipe( T.Body("shared_dictionary"), ), ), stripEtags: S.optional(S.Boolean.pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.Boolean.pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional(S.Boolean.pipe(T.Body("strip_set_cookie"))), vary: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersVary, ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleCategoriesList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheSettingsRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemSetCacheSettingsRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemSetCacheSettingsRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemSetCacheSettingsRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemSetCacheSettingsRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemSetCacheSettingsRuleAction), actionParameters: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( CreateRequestRulesItemSetCacheSettingsRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( CreateRequestRulesItemSetCacheSettingsRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsAction = "set_cache_tags"; export const CreateRequestRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation | (string & {}); } export const CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation | (string & {}); } export const CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation | (string & {}); } export const CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsActionParameters = | CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues | CreateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | CreateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues | CreateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const CreateRequestRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type CreateRequestRulesItemSetCacheTagsCategoriesList = Array; export const CreateRequestRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemSetCacheTags { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemSetCacheTagsAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemSetCacheTagsActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemSetCacheTagsCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemSetCacheTagsRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemSetCacheTagsAction), actionParameters: S.optional( CreateRequestRulesItemSetCacheTagsActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemSetCacheTagsCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemSetCacheTagsRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemSetCacheTags", }) as any as S.Schema; export type CreateRequestRulesItemSetConfigRuleAction = "set_config"; export const CreateRequestRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetConfigRuleActionParametersAutominify { /** Whether to minify CSS files. */ css?: boolean; /** Whether to minify HTML files. */ html?: boolean; /** Whether to minify JavaScript files. */ js?: boolean; } export const CreateRequestRulesItemSetConfigRuleActionParametersAutominify = /*@__PURE__*/ S.suspend(() => S.Struct({ css: S.optional(S.Boolean), html: S.optional(S.Boolean), js: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateRequestRulesItemSetConfigRuleActionParametersAutominify", }) as any as S.Schema; export type CreateRequestRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const CreateRequestRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const CreateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const CreateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const CreateRequestRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const CreateRequestRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface CreateRequestRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean; /** Which file extensions to minify automatically. */ autominify?: CreateRequestRulesItemSetConfigRuleActionParametersAutominify; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean; /** Whether to disable Zaraz. */ disableZaraz?: boolean; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean; /** Whether to enable Mirage. */ mirage?: boolean; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean; /** The Polish level to configure. */ polish?: | CreateRequestRulesItemSetConfigRuleActionParametersPolish | (string & {}); /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean; /** The request body buffering mode. */ requestBodyBuffering?: | CreateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering | (string & {}); /** The response body buffering mode. */ responseBodyBuffering?: | CreateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering | (string & {}); /** Whether to enable Rocket Loader. */ rocketLoader?: boolean; /** The Security Level to configure. */ securityLevel?: | CreateRequestRulesItemSetConfigRuleActionParametersSecurityLevel | (string & {}); /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean; /** The SSL level to configure. */ ssl?: CreateRequestRulesItemSetConfigRuleActionParametersSsl | (string & {}); /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean; } export const CreateRequestRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.Boolean.pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersAutominify, ), bic: S.optional(S.Boolean), contentConverter: S.optional(S.Boolean.pipe(T.Body("content_converter"))), disableApps: S.optional(S.Boolean.pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.Boolean.pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.Boolean.pipe(T.Body("disable_rum"))), disableZaraz: S.optional(S.Boolean.pipe(T.Body("disable_zaraz"))), emailObfuscation: S.optional(S.Boolean.pipe(T.Body("email_obfuscation"))), fonts: S.optional(S.Boolean), hotlinkProtection: S.optional( S.Boolean.pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.Boolean), opportunisticEncryption: S.optional( S.Boolean.pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersPolish, ), redirectsForAiTraining: S.optional( S.Boolean.pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering.pipe( T.Body("request_body_buffering"), ), ), responseBodyBuffering: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering.pipe( T.Body("response_body_buffering"), ), ), rocketLoader: S.optional(S.Boolean.pipe(T.Body("rocket_loader"))), securityLevel: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersSecurityLevel.pipe( T.Body("security_level"), ), ), serverSideExcludes: S.optional( S.Boolean.pipe(T.Body("server_side_excludes")), ), ssl: S.optional(CreateRequestRulesItemSetConfigRuleActionParametersSsl), sxg: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateRequestRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemSetConfigRuleCategoriesList = Array; export const CreateRequestRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemSetConfigRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemSetConfigRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemSetConfigRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemSetConfigRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemSetConfigRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemSetConfigRuleAction), actionParameters: S.optional( CreateRequestRulesItemSetConfigRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemSetConfigRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemSetConfigRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemSetConfigRule", }) as any as S.Schema; export type CreateRequestRulesItemSkipRuleAction = "skip"; export const CreateRequestRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSkipRuleActionParametersPhase = "current"; export const CreateRequestRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const CreateRequestRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSkipRuleActionParametersPhasesList = Array< CreateRequestRulesItemSkipRuleActionParametersPhasesItem | (string & {}) >; export const CreateRequestRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( CreateRequestRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type CreateRequestRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const CreateRequestRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSkipRuleActionParametersProductsList = Array< CreateRequestRulesItemSkipRuleActionParametersProductsItem | (string & {}) >; export const CreateRequestRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type CreateRequestRulesItemSkipRuleActionParametersRulesValueList = Array; export const CreateRequestRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | CreateRequestRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const CreateRequestRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, CreateRequestRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type CreateRequestRulesItemSkipRuleActionParametersRuleset = "current"; export const CreateRequestRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type CreateRequestRulesItemSkipRuleActionParametersRulesetsList = Array; export const CreateRequestRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: CreateRequestRulesItemSkipRuleActionParametersPhase | (string & {}); /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: CreateRequestRulesItemSkipRuleActionParametersPhasesList; /** A list of legacy security products to skip the execution of. */ products?: CreateRequestRulesItemSkipRuleActionParametersProductsList; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: CreateRequestRulesItemSkipRuleActionParametersRulesMap; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: | CreateRequestRulesItemSkipRuleActionParametersRuleset | (string & {}); /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: CreateRequestRulesItemSkipRuleActionParametersRulesetsList; } export const CreateRequestRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional(CreateRequestRulesItemSkipRuleActionParametersPhase), phases: S.optional( CreateRequestRulesItemSkipRuleActionParametersPhasesList, ), products: S.optional( CreateRequestRulesItemSkipRuleActionParametersProductsList, ), rules: S.optional(CreateRequestRulesItemSkipRuleActionParametersRulesMap), ruleset: S.optional( CreateRequestRulesItemSkipRuleActionParametersRuleset, ), rulesets: S.optional( CreateRequestRulesItemSkipRuleActionParametersRulesetsList, ), }), ).annotate({ identifier: "CreateRequestRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type CreateRequestRulesItemSkipRuleCategoriesList = Array; export const CreateRequestRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateRequestRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemSkipRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemSkipRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemSkipRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemSkipRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemSkipRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemSkipRuleAction), actionParameters: S.optional( CreateRequestRulesItemSkipRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(CreateRequestRulesItemSkipRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(CreateRequestRulesItemSkipRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemSkipRule", }) as any as S.Schema; export type CreateRequestRulesItemTransformResponseHTMLAction = "transform_response_html"; export const CreateRequestRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type CreateRequestRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const CreateRequestRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type CreateRequestRulesItemTransformResponseHTMLCategoriesList = Array; export const CreateRequestRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateRequestRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateRequestRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const CreateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateRequestRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const CreateRequestRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateRequestRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface CreateRequestRulesItemTransformResponseHTML { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: CreateRequestRulesItemTransformResponseHTMLAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; /** The categories of the rule. */ categories?: CreateRequestRulesItemTransformResponseHTMLCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateRequestRulesItemTransformResponseHTMLRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const CreateRequestRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(CreateRequestRulesItemTransformResponseHTMLAction), actionParameters: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( CreateRequestRulesItemTransformResponseHTMLCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( CreateRequestRulesItemTransformResponseHTMLRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "CreateRequestRulesItemTransformResponseHTML", }) as any as S.Schema; export type CreateRequestRulesItem = | CreateRequestRulesItemBlockRule | CreateRequestRulesItemChallenge | CreateRequestRulesItemCompressResponseRule | CreateRequestRulesItemDDoSDynamicRule | CreateRequestRulesItemExecuteRule | CreateRequestRulesItemForceConnectionCloseRule | CreateRequestRulesItemJSChallenge | CreateRequestRulesItemLogRule | CreateRequestRulesItemLogCustomFieldRule | CreateRequestRulesItemManagedChallengeRule | CreateRequestRulesItemRedirectRule | CreateRequestRulesItemRewriteRule | CreateRequestRulesItemRouteRule | CreateRequestRulesItemScoreRule | CreateRequestRulesItemServeErrorRule | CreateRequestRulesItemSetCacheControl | CreateRequestRulesItemSetCacheSettingsRule | CreateRequestRulesItemSetCacheTags | CreateRequestRulesItemSetConfigRule | CreateRequestRulesItemSkipRule | CreateRequestRulesItemTransformResponseHTML; export const CreateRequestRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type CreateRequestRulesList = Array; export const CreateRequestRulesList = /*@__PURE__*/ S.Array( CreateRequestRulesItem, ) as any as S.Schema; export interface CreateRulesetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The kind of the ruleset. */ kind: CreateRequestKind | (string & {}); /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: CreateRequestPhase | (string & {}); /** An informative description of the ruleset. */ description?: string; /** The list of rules in the ruleset. */ rules?: CreateRequestRulesList; } export const CreateRulesetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), kind: CreateRequestKind, name: S.String, phase: CreateRequestPhase, description: S.optional(S.String), rules: S.optional(CreateRequestRulesList), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/rulesets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRulesetForAccountRequest", }) as any as S.Schema; export type CreateResponseKind = "managed" | "custom" | "root" | "zone"; export const CreateResponseKind = /*@__PURE__*/ S.String; export type CreateResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const CreateResponsePhase = /*@__PURE__*/ S.String; export type CreateResponseRulesItemBlockRuleAction = "block"; export const CreateResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const CreateResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type CreateResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const CreateResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type CreateResponseRulesItemBlockRuleCategoriesList = Array; export const CreateResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const CreateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type CreateResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(CreateResponseRulesItemBlockRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemBlockRule", }) as any as S.Schema; export type CreateResponseRulesItemChallengeAction = "challenge"; export const CreateResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemChallengeCategoriesList = Array; export const CreateResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(CreateResponseRulesItemChallengeRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemChallenge", }) as any as S.Schema; export type CreateResponseRulesItemCompressResponseRuleAction = "compress_response"; export const CreateResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface CreateResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const CreateResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: CreateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "CreateResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemCompressResponseRuleCategoriesList = Array; export const CreateResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( CreateResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemCompressResponseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type CreateResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const CreateResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const CreateResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleAction = "execute"; export const CreateResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const CreateResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const CreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: CreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const CreateResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( CreateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( CreateResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( CreateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "CreateResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface CreateResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: CreateResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const CreateResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr(CreateResponseRulesItemExecuteRuleActionParametersOverrides), ), }), ).annotate({ identifier: "CreateResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleCategoriesList = Array; export const CreateResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemExecuteRuleAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemExecuteRule", }) as any as S.Schema; export type CreateResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const CreateResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const CreateResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemForceConnectionCloseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type CreateResponseRulesItemJSChallengeAction = "js_challenge"; export const CreateResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemJSChallengeCategoriesList = Array; export const CreateResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemJSChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemJSChallenge", }) as any as S.Schema; export type CreateResponseRulesItemLogRuleAction = "log"; export const CreateResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemLogRuleCategoriesList = Array; export const CreateResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(CreateResponseRulesItemLogRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemLogRule", }) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const CreateResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type CreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const CreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface CreateResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: CreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: CreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: CreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: CreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: CreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const CreateResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( CreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( CreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( CreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( CreateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( CreateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "CreateResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const CreateResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( CreateResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type CreateResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const CreateResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const CreateResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemManagedChallengeRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type CreateResponseRulesItemRedirectRuleAction = "redirect"; export const CreateResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const CreateResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type CreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const CreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type CreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const CreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface CreateResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: CreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const CreateResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( CreateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "CreateResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface CreateResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: CreateResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const CreateResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( CreateResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "CreateResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemRedirectRuleCategoriesList = Array; export const CreateResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemRedirectRuleAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemRedirectRule", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleAction = "rewrite"; export const CreateResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleActionParametersHeaders = | CreateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | CreateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | CreateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | CreateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | CreateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const CreateResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type CreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const CreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type CreateResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const CreateResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type CreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const CreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type CreateResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const CreateResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type CreateResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const CreateResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface CreateResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: CreateResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: CreateResponseRulesItemRewriteRuleActionParametersUri | null; } export const CreateResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr(CreateResponseRulesItemRewriteRuleActionParametersHeaders), ), uri: S.optional( S.NullOr(CreateResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleCategoriesList = Array; export const CreateResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemRewriteRuleAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemRewriteRule", }) as any as S.Schema; export type CreateResponseRulesItemRouteRuleAction = "route"; export const CreateResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const CreateResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type CreateResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const CreateResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type CreateResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const CreateResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type CreateResponseRulesItemRouteRuleCategoriesList = Array; export const CreateResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(CreateResponseRulesItemRouteRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemRouteRule", }) as any as S.Schema; export type CreateResponseRulesItemScoreRuleAction = "score"; export const CreateResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const CreateResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type CreateResponseRulesItemScoreRuleCategoriesList = Array; export const CreateResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(CreateResponseRulesItemScoreRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemScoreRule", }) as any as S.Schema; export type CreateResponseRulesItemServeErrorRuleAction = "serve_error"; export const CreateResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type CreateResponseRulesItemServeErrorRuleActionParameters = | CreateResponseRulesItemServeErrorRuleActionParametersActionParametersContent | CreateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const CreateResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type CreateResponseRulesItemServeErrorRuleCategoriesList = Array; export const CreateResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemServeErrorRuleAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemServeErrorRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemServeErrorRule", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlAction = "set_cache_control"; export const CreateResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersImmutable = | CreateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | CreateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersMaxAge = | CreateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | CreateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersMustRevalidate = | CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | CreateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersMustUnderstand = | CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | CreateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersNoCache = | CreateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | CreateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersNoStore = | CreateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | CreateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersNoTransform = | CreateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | CreateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersPrivate = | CreateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | CreateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersPublic = | CreateResponseRulesItemSetCacheControlActionParametersPublicSetDirective | CreateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersSMaxage = | CreateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | CreateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersStaleIfError = | CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | CreateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface CreateResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: CreateResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: CreateResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: CreateResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: CreateResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: CreateResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: CreateResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: CreateResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: CreateResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: CreateResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: CreateResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: CreateResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const CreateResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr(CreateResponseRulesItemSetCacheControlActionParametersPrivate), ), proxyRevalidate: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr(CreateResponseRulesItemSetCacheControlActionParametersPublic), ), sMaxage: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( CreateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlCategoriesList = Array; export const CreateResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemSetCacheControlActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheControl", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const CreateResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: CreateResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const CreateResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( CreateResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemSetCacheSettingsRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const CreateResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsActionParameters = | CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | CreateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | CreateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | CreateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const CreateResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type CreateResponseRulesItemSetCacheTagsCategoriesList = Array; export const CreateResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemSetCacheTagsAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemSetCacheTags", }) as any as S.Schema; export type CreateResponseRulesItemSetConfigRuleAction = "set_config"; export const CreateResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const CreateResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type CreateResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const CreateResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const CreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const CreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const CreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const CreateResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface CreateResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: CreateResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: CreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: CreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: CreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: CreateResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const CreateResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr(CreateResponseRulesItemSetConfigRuleActionParametersPolish), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( CreateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( CreateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( CreateResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(CreateResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "CreateResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemSetConfigRuleCategoriesList = Array; export const CreateResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemSetConfigRuleAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemSetConfigRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemSetConfigRule", }) as any as S.Schema; export type CreateResponseRulesItemSkipRuleAction = "skip"; export const CreateResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSkipRuleActionParametersPhase = "current"; export const CreateResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const CreateResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const CreateResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( CreateResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type CreateResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const CreateResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSkipRuleActionParametersProductsList = Array; export const CreateResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( CreateResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type CreateResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const CreateResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | CreateResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const CreateResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, CreateResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type CreateResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const CreateResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type CreateResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const CreateResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: CreateResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: CreateResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: CreateResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: CreateResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: CreateResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: CreateResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const CreateResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParametersPhasesList), ), products: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParametersProductsList), ), rules: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParametersRulesetsList), ), }), ).annotate({ identifier: "CreateResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type CreateResponseRulesItemSkipRuleCategoriesList = Array; export const CreateResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: CreateResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: CreateResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(CreateResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(CreateResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(CreateResponseRulesItemSkipRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemSkipRule", }) as any as S.Schema; export type CreateResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const CreateResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type CreateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const CreateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type CreateResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const CreateResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type CreateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const CreateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type CreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const CreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: CreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const CreateResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: CreateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "CreateResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface CreateResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: CreateResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: CreateResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: CreateResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const CreateResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(CreateResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(CreateResponseRulesItemTransformResponseHTMLCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(CreateResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CreateResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type CreateResponseRulesItem = | CreateResponseRulesItemBlockRule | CreateResponseRulesItemChallenge | CreateResponseRulesItemCompressResponseRule | CreateResponseRulesItemDDoSDynamicRule | CreateResponseRulesItemExecuteRule | CreateResponseRulesItemForceConnectionCloseRule | CreateResponseRulesItemJSChallenge | CreateResponseRulesItemLogRule | CreateResponseRulesItemLogCustomFieldRule | CreateResponseRulesItemManagedChallengeRule | CreateResponseRulesItemRedirectRule | CreateResponseRulesItemRewriteRule | CreateResponseRulesItemRouteRule | CreateResponseRulesItemScoreRule | CreateResponseRulesItemServeErrorRule | CreateResponseRulesItemSetCacheControl | CreateResponseRulesItemSetCacheSettingsRule | CreateResponseRulesItemSetCacheTags | CreateResponseRulesItemSetConfigRule | CreateResponseRulesItemSkipRule | CreateResponseRulesItemTransformResponseHTML; export const CreateResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type CreateResponseRulesList = Array; export const CreateResponseRulesList = /*@__PURE__*/ S.Array( CreateResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateRulesetResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: CreateResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: CreateResponsePhase; /** The list of rules in the ruleset. */ rules: CreateResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const CreateRulesetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: CreateResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: CreateResponsePhase, rules: CreateResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRulesetResponse", }) as any as S.Schema; export interface CreateRulesetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The kind of the ruleset. */ kind: CreateRequestKind | (string & {}); /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: CreateRequestPhase | (string & {}); /** An informative description of the ruleset. */ description?: string; /** The list of rules in the ruleset. */ rules?: CreateRequestRulesList; } export const CreateRulesetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), kind: CreateRequestKind, name: S.String, phase: CreateRequestPhase, description: S.optional(S.String), rules: S.optional(CreateRequestRulesList), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/rulesets", code: 200 }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRulesetForZoneRequest", }) as any as S.Schema; export interface DeleteRuleForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The unique ID of the rule. */ ruleId: string; } export const DeleteRuleForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/rulesets/{ruleset_id}/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRuleForAccountRequest", }) as any as S.Schema; export type RulesDeleteResponseKind = "managed" | "custom" | "root" | "zone"; export const RulesDeleteResponseKind = /*@__PURE__*/ S.String; export type RulesDeleteResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const RulesDeleteResponsePhase = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemBlockRuleAction = "block"; export const RulesDeleteResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const RulesDeleteResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type RulesDeleteResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const RulesDeleteResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type RulesDeleteResponseRulesItemBlockRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const RulesDeleteResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type RulesDeleteResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesDeleteResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemBlockRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemChallengeAction = "challenge"; export const RulesDeleteResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemChallengeCategoriesList = Array; export const RulesDeleteResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesDeleteResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemChallenge", }) as any as S.Schema; export type RulesDeleteResponseRulesItemCompressResponseRuleAction = "compress_response"; export const RulesDeleteResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const RulesDeleteResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: RulesDeleteResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemCompressResponseRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( RulesDeleteResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesDeleteResponseRulesItemCompressResponseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const RulesDeleteResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleAction = "execute"; export const RulesDeleteResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const RulesDeleteResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const RulesDeleteResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: RulesDeleteResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const RulesDeleteResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( RulesDeleteResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemExecuteRuleAction), ), actionParameters: S.optional( S.NullOr(RulesDeleteResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemExecuteRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const RulesDeleteResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesDeleteResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemJSChallengeAction = "js_challenge"; export const RulesDeleteResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemJSChallengeCategoriesList = Array; export const RulesDeleteResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemJSChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemJSChallenge", }) as any as S.Schema; export type RulesDeleteResponseRulesItemLogRuleAction = "log"; export const RulesDeleteResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemLogRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesDeleteResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemLogRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemLogRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const RulesDeleteResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const RulesDeleteResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( RulesDeleteResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( RulesDeleteResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const RulesDeleteResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesDeleteResponseRulesItemManagedChallengeRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRedirectRuleAction = "redirect"; export const RulesDeleteResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const RulesDeleteResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const RulesDeleteResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( RulesDeleteResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRedirectRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr(RulesDeleteResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRedirectRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleAction = "rewrite"; export const RulesDeleteResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersHeaders = | RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | RulesDeleteResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type RulesDeleteResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const RulesDeleteResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface RulesDeleteResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: RulesDeleteResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: RulesDeleteResponseRulesItemRewriteRuleActionParametersUri | null; } export const RulesDeleteResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr( RulesDeleteResponseRulesItemRewriteRuleActionParametersHeaders, ), ), uri: S.optional( S.NullOr(RulesDeleteResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemRewriteRuleAction), ), actionParameters: S.optional( S.NullOr(RulesDeleteResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRewriteRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemRouteRuleAction = "route"; export const RulesDeleteResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const RulesDeleteResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type RulesDeleteResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const RulesDeleteResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type RulesDeleteResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const RulesDeleteResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type RulesDeleteResponseRulesItemRouteRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesDeleteResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemRouteRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemScoreRuleAction = "score"; export const RulesDeleteResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const RulesDeleteResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type RulesDeleteResponseRulesItemScoreRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesDeleteResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemScoreRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemServeErrorRuleAction = "serve_error"; export const RulesDeleteResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type RulesDeleteResponseRulesItemServeErrorRuleActionParameters = | RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersContent | RulesDeleteResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const RulesDeleteResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type RulesDeleteResponseRulesItemServeErrorRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr( RulesDeleteResponseRulesItemServeErrorRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemServeErrorRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlAction = "set_cache_control"; export const RulesDeleteResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutable = | RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAge = | RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidate = | RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstand = | RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCache = | RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStore = | RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransform = | RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivate = | RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersPublic = | RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxage = | RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfError = | RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface RulesDeleteResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: RulesDeleteResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const RulesDeleteResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlCategoriesList = Array; export const RulesDeleteResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheControl", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetCacheSettingsRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const RulesDeleteResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsActionParameters = | RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | RulesDeleteResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | RulesDeleteResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | RulesDeleteResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const RulesDeleteResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type RulesDeleteResponseRulesItemSetCacheTagsCategoriesList = Array; export const RulesDeleteResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetCacheTags", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetConfigRuleAction = "set_config"; export const RulesDeleteResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const RulesDeleteResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type RulesDeleteResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const RulesDeleteResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const RulesDeleteResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const RulesDeleteResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const RulesDeleteResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const RulesDeleteResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface RulesDeleteResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: RulesDeleteResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: RulesDeleteResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: RulesDeleteResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: RulesDeleteResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: RulesDeleteResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const RulesDeleteResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetConfigRuleActionParametersPolish, ), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSetConfigRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr( RulesDeleteResponseRulesItemSetConfigRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSetConfigRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleAction = "skip"; export const RulesDeleteResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSkipRuleActionParametersPhase = "current"; export const RulesDeleteResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const RulesDeleteResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSkipRuleActionParametersProductsList = Array; export const RulesDeleteResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( RulesDeleteResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const RulesDeleteResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | RulesDeleteResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const RulesDeleteResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, RulesDeleteResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const RulesDeleteResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const RulesDeleteResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: RulesDeleteResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: RulesDeleteResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: RulesDeleteResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: RulesDeleteResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: RulesDeleteResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const RulesDeleteResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(RulesDeleteResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr( RulesDeleteResponseRulesItemSkipRuleActionParametersPhasesList, ), ), products: S.optional( S.NullOr( RulesDeleteResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr(RulesDeleteResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(RulesDeleteResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr( RulesDeleteResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleCategoriesList = Array; export const RulesDeleteResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesDeleteResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesDeleteResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(RulesDeleteResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesDeleteResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemSkipRule", }) as any as S.Schema; export type RulesDeleteResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const RulesDeleteResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type RulesDeleteResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const RulesDeleteResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type RulesDeleteResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const RulesDeleteResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesDeleteResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesDeleteResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesDeleteResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const RulesDeleteResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesDeleteResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesDeleteResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesDeleteResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesDeleteResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface RulesDeleteResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesDeleteResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesDeleteResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesDeleteResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesDeleteResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesDeleteResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesDeleteResponseRulesItemTransformResponseHTMLCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesDeleteResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesDeleteResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type RulesDeleteResponseRulesItem = | RulesDeleteResponseRulesItemBlockRule | RulesDeleteResponseRulesItemChallenge | RulesDeleteResponseRulesItemCompressResponseRule | RulesDeleteResponseRulesItemDDoSDynamicRule | RulesDeleteResponseRulesItemExecuteRule | RulesDeleteResponseRulesItemForceConnectionCloseRule | RulesDeleteResponseRulesItemJSChallenge | RulesDeleteResponseRulesItemLogRule | RulesDeleteResponseRulesItemLogCustomFieldRule | RulesDeleteResponseRulesItemManagedChallengeRule | RulesDeleteResponseRulesItemRedirectRule | RulesDeleteResponseRulesItemRewriteRule | RulesDeleteResponseRulesItemRouteRule | RulesDeleteResponseRulesItemScoreRule | RulesDeleteResponseRulesItemServeErrorRule | RulesDeleteResponseRulesItemSetCacheControl | RulesDeleteResponseRulesItemSetCacheSettingsRule | RulesDeleteResponseRulesItemSetCacheTags | RulesDeleteResponseRulesItemSetConfigRule | RulesDeleteResponseRulesItemSkipRule | RulesDeleteResponseRulesItemTransformResponseHTML; export const RulesDeleteResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type RulesDeleteResponseRulesList = Array; export const RulesDeleteResponseRulesList = /*@__PURE__*/ S.Array( RulesDeleteResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteRuleResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: RulesDeleteResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: RulesDeleteResponsePhase; /** The list of rules in the ruleset. */ rules: RulesDeleteResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const DeleteRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: RulesDeleteResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: RulesDeleteResponsePhase, rules: RulesDeleteResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRuleResponse", }) as any as S.Schema; export interface DeleteRuleForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The unique ID of the rule. */ ruleId: string; } export const DeleteRuleForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/rulesets/{ruleset_id}/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRuleForZoneRequest", }) as any as S.Schema; export interface DeleteRulesetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; } export const DeleteRulesetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/rulesets/{ruleset_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRulesetForAccountRequest", }) as any as S.Schema; export interface DeleteRulesetForAccountResponse {} export const DeleteRulesetForAccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRulesetForAccountResponse", }) as any as S.Schema; export interface DeleteRulesetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; } export const DeleteRulesetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/rulesets/{ruleset_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRulesetForZoneRequest", }) as any as S.Schema; export interface DeleteRulesetForZoneResponse {} export const DeleteRulesetForZoneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRulesetForZoneResponse", }) as any as S.Schema; export interface DeleteVersionForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The version of the ruleset. */ rulesetVersion: string; } export const DeleteVersionForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), rulesetVersion: S.String.pipe(T.Label("ruleset_version")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteVersionForAccountRequest", }) as any as S.Schema; export interface DeleteVersionForAccountResponse {} export const DeleteVersionForAccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteVersionForAccountResponse", }) as any as S.Schema; export interface DeleteVersionForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The version of the ruleset. */ rulesetVersion: string; } export const DeleteVersionForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), rulesetVersion: S.String.pipe(T.Label("ruleset_version")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteVersionForZoneRequest", }) as any as S.Schema; export interface DeleteVersionForZoneResponse {} export const DeleteVersionForZoneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteVersionForZoneResponse", }) as any as S.Schema; export interface GetPhasForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The phase of the ruleset. */ rulesetPhase: string; } export const GetPhasForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPhasForAccountRequest", }) as any as S.Schema; export type PhasesGetResponseKind = "managed" | "custom" | "root" | "zone"; export const PhasesGetResponseKind = /*@__PURE__*/ S.String; export type PhasesGetResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesGetResponsePhase = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemBlockRuleAction = "block"; export const PhasesGetResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const PhasesGetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type PhasesGetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const PhasesGetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type PhasesGetResponseRulesItemBlockRuleCategoriesList = Array; export const PhasesGetResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const PhasesGetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type PhasesGetResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemBlockRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemChallengeAction = "challenge"; export const PhasesGetResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemChallengeCategoriesList = Array; export const PhasesGetResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemChallenge", }) as any as S.Schema; export type PhasesGetResponseRulesItemCompressResponseRuleAction = "compress_response"; export const PhasesGetResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface PhasesGetResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const PhasesGetResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: PhasesGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "PhasesGetResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemCompressResponseRuleCategoriesList = Array; export const PhasesGetResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesGetResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemCompressResponseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const PhasesGetResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const PhasesGetResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleAction = "execute"; export const PhasesGetResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const PhasesGetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const PhasesGetResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( PhasesGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface PhasesGetResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: PhasesGetResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const PhasesGetResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( PhasesGetResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleCategoriesList = Array; export const PhasesGetResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemExecuteRuleAction)), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemExecuteRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const PhasesGetResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const PhasesGetResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesGetResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemJSChallengeAction = "js_challenge"; export const PhasesGetResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemJSChallengeCategoriesList = Array; export const PhasesGetResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemJSChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemJSChallenge", }) as any as S.Schema; export type PhasesGetResponseRulesItemLogRuleAction = "log"; export const PhasesGetResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemLogRuleCategoriesList = Array; export const PhasesGetResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(PhasesGetResponseRulesItemLogRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemLogRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const PhasesGetResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface PhasesGetResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const PhasesGetResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( PhasesGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesGetResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const PhasesGetResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const PhasesGetResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemManagedChallengeRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemRedirectRuleAction = "redirect"; export const PhasesGetResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const PhasesGetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type PhasesGetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const PhasesGetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type PhasesGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const PhasesGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface PhasesGetResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: PhasesGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const PhasesGetResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( PhasesGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface PhasesGetResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: PhasesGetResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const PhasesGetResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( PhasesGetResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemRedirectRuleCategoriesList = Array; export const PhasesGetResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRedirectRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleAction = "rewrite"; export const PhasesGetResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleActionParametersHeaders = | PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | PhasesGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const PhasesGetResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesGetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type PhasesGetResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesGetResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface PhasesGetResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: PhasesGetResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: PhasesGetResponseRulesItemRewriteRuleActionParametersUri | null; } export const PhasesGetResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr(PhasesGetResponseRulesItemRewriteRuleActionParametersHeaders), ), uri: S.optional( S.NullOr(PhasesGetResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleCategoriesList = Array; export const PhasesGetResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemRewriteRuleAction)), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRewriteRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemRouteRuleAction = "route"; export const PhasesGetResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const PhasesGetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type PhasesGetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const PhasesGetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type PhasesGetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const PhasesGetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type PhasesGetResponseRulesItemRouteRuleCategoriesList = Array; export const PhasesGetResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemRouteRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemScoreRuleAction = "score"; export const PhasesGetResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const PhasesGetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type PhasesGetResponseRulesItemScoreRuleCategoriesList = Array; export const PhasesGetResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemScoreRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemServeErrorRuleAction = "serve_error"; export const PhasesGetResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type PhasesGetResponseRulesItemServeErrorRuleActionParameters = | PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent | PhasesGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const PhasesGetResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type PhasesGetResponseRulesItemServeErrorRuleCategoriesList = Array; export const PhasesGetResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemServeErrorRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemServeErrorRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlAction = "set_cache_control"; export const PhasesGetResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersImmutable = | PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAge = | PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidate = | PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstand = | PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoCache = | PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoStore = | PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransform = | PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersPrivate = | PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersPublic = | PhasesGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxage = | PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfError = | PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface PhasesGetResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: PhasesGetResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: PhasesGetResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: PhasesGetResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: PhasesGetResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: PhasesGetResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const PhasesGetResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlCategoriesList = Array; export const PhasesGetResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheControl", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const PhasesGetResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesGetResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheSettingsRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const PhasesGetResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsActionParameters = | PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | PhasesGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | PhasesGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | PhasesGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const PhasesGetResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type PhasesGetResponseRulesItemSetCacheTagsCategoriesList = Array; export const PhasesGetResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetCacheTags", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetConfigRuleAction = "set_config"; export const PhasesGetResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const PhasesGetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type PhasesGetResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const PhasesGetResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const PhasesGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const PhasesGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const PhasesGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const PhasesGetResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface PhasesGetResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: PhasesGetResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: PhasesGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: PhasesGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: PhasesGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: PhasesGetResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const PhasesGetResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr(PhasesGetResponseRulesItemSetConfigRuleActionParametersPolish), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( PhasesGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( PhasesGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( PhasesGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(PhasesGetResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemSetConfigRuleCategoriesList = Array; export const PhasesGetResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemSetConfigRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSetConfigRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleAction = "skip"; export const PhasesGetResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSkipRuleActionParametersPhase = "current"; export const PhasesGetResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesGetResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const PhasesGetResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( PhasesGetResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const PhasesGetResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSkipRuleActionParametersProductsList = Array; export const PhasesGetResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( PhasesGetResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const PhasesGetResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | PhasesGetResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const PhasesGetResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, PhasesGetResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const PhasesGetResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const PhasesGetResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: PhasesGetResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: PhasesGetResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: PhasesGetResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: PhasesGetResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: PhasesGetResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: PhasesGetResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const PhasesGetResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleActionParametersPhasesList), ), products: S.optional( S.NullOr( PhasesGetResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr( PhasesGetResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleCategoriesList = Array; export const PhasesGetResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesGetResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesGetResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemSkipRule", }) as any as S.Schema; export type PhasesGetResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const PhasesGetResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type PhasesGetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const PhasesGetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type PhasesGetResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const PhasesGetResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesGetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesGetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const PhasesGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesGetResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesGetResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesGetResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface PhasesGetResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesGetResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesGetResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesGetResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesGetResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesGetResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesGetResponseRulesItemTransformResponseHTMLCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesGetResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesGetResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type PhasesGetResponseRulesItem = | PhasesGetResponseRulesItemBlockRule | PhasesGetResponseRulesItemChallenge | PhasesGetResponseRulesItemCompressResponseRule | PhasesGetResponseRulesItemDDoSDynamicRule | PhasesGetResponseRulesItemExecuteRule | PhasesGetResponseRulesItemForceConnectionCloseRule | PhasesGetResponseRulesItemJSChallenge | PhasesGetResponseRulesItemLogRule | PhasesGetResponseRulesItemLogCustomFieldRule | PhasesGetResponseRulesItemManagedChallengeRule | PhasesGetResponseRulesItemRedirectRule | PhasesGetResponseRulesItemRewriteRule | PhasesGetResponseRulesItemRouteRule | PhasesGetResponseRulesItemScoreRule | PhasesGetResponseRulesItemServeErrorRule | PhasesGetResponseRulesItemSetCacheControl | PhasesGetResponseRulesItemSetCacheSettingsRule | PhasesGetResponseRulesItemSetCacheTags | PhasesGetResponseRulesItemSetConfigRule | PhasesGetResponseRulesItemSkipRule | PhasesGetResponseRulesItemTransformResponseHTML; export const PhasesGetResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type PhasesGetResponseRulesList = Array; export const PhasesGetResponseRulesList = /*@__PURE__*/ S.Array( PhasesGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPhasResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: PhasesGetResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: PhasesGetResponsePhase; /** The list of rules in the ruleset. */ rules: PhasesGetResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const GetPhasResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: PhasesGetResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: PhasesGetResponsePhase, rules: PhasesGetResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPhasResponse", }) as any as S.Schema; export interface GetPhasForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The phase of the ruleset. */ rulesetPhase: string; } export const GetPhasForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPhasForZoneRequest", }) as any as S.Schema; export interface GetPhasVersionForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The phase of the ruleset. */ rulesetPhase: string; /** The version of the ruleset. */ rulesetVersion: string; } export const GetPhasVersionForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), rulesetVersion: S.String.pipe(T.Label("ruleset_version")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPhasVersionForAccountRequest", }) as any as S.Schema; export type PhasesVersionsGetResponseKind = | "managed" | "custom" | "root" | "zone"; export const PhasesVersionsGetResponseKind = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesVersionsGetResponsePhase = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemBlockRuleAction = "block"; export const PhasesVersionsGetResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const PhasesVersionsGetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type PhasesVersionsGetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const PhasesVersionsGetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type PhasesVersionsGetResponseRulesItemBlockRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const PhasesVersionsGetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type PhasesVersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemBlockRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemBlockRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemChallengeAction = "challenge"; export const PhasesVersionsGetResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemChallengeCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemChallenge", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemCompressResponseRuleAction = "compress_response"; export const PhasesVersionsGetResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemCompressResponseRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemCompressResponseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemCompressResponseRuleRatelimit, ), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const PhasesVersionsGetResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleAction = "execute"; export const PhasesVersionsGetResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const PhasesVersionsGetResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemExecuteRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemExecuteRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemExecuteRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleAction, ), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit, ), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemJSChallengeAction = "js_challenge"; export const PhasesVersionsGetResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemJSChallengeCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemJSChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemJSChallenge", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogRuleAction = "log"; export const PhasesVersionsGetResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemLogRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemLogRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemLogRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemLogRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const PhasesVersionsGetResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemManagedChallengeRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemManagedChallengeRuleRatelimit, ), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRedirectRuleAction = "redirect"; export const PhasesVersionsGetResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const PhasesVersionsGetResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRedirectRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemRedirectRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRedirectRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleAction = "rewrite"; export const PhasesVersionsGetResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeaders = | PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface PhasesVersionsGetResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUri | null; } export const PhasesVersionsGetResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersHeaders, ), ), uri: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemRewriteRuleActionParametersUri, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRewriteRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemRewriteRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRewriteRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRouteRuleAction = "route"; export const PhasesVersionsGetResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const PhasesVersionsGetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type PhasesVersionsGetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const PhasesVersionsGetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type PhasesVersionsGetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const PhasesVersionsGetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type PhasesVersionsGetResponseRulesItemRouteRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRouteRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemRouteRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemScoreRuleAction = "score"; export const PhasesVersionsGetResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const PhasesVersionsGetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type PhasesVersionsGetResponseRulesItemScoreRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemScoreRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemScoreRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemServeErrorRuleAction = "serve_error"; export const PhasesVersionsGetResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemServeErrorRuleActionParameters = | PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent | PhasesVersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const PhasesVersionsGetResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type PhasesVersionsGetResponseRulesItemServeErrorRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemServeErrorRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemServeErrorRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemServeErrorRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlAction = "set_cache_control"; export const PhasesVersionsGetResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutable = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCache = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStore = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivate = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublic = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface PhasesVersionsGetResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheControlCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheControl", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit, ), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsActionParameters = | PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | PhasesVersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const PhasesVersionsGetResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type PhasesVersionsGetResponseRulesItemSetCacheTagsCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetCacheTagsActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetCacheTags", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetConfigRuleAction = "set_config"; export const PhasesVersionsGetResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface PhasesVersionsGetResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const PhasesVersionsGetResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersPolish, ), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetConfigRuleActionParametersSsl, ), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetConfigRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSetConfigRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSetConfigRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleAction = "skip"; export const PhasesVersionsGetResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhase = "current"; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsList = Array; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const PhasesVersionsGetResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhase, ), ), phases: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersPhasesList, ), ), products: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesMap, ), ), ruleset: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRuleset, ), ), rulesets: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesVersionsGetResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSkipRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemSkipRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemSkipRule", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const PhasesVersionsGetResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type PhasesVersionsGetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const PhasesVersionsGetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type PhasesVersionsGetResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const PhasesVersionsGetResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesVersionsGetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesVersionsGetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface PhasesVersionsGetResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesVersionsGetResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesVersionsGetResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesVersionsGetResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesVersionsGetResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemTransformResponseHTMLCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr( PhasesVersionsGetResponseRulesItemTransformResponseHTMLRatelimit, ), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsGetResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type PhasesVersionsGetResponseRulesItem = | PhasesVersionsGetResponseRulesItemBlockRule | PhasesVersionsGetResponseRulesItemChallenge | PhasesVersionsGetResponseRulesItemCompressResponseRule | PhasesVersionsGetResponseRulesItemDDoSDynamicRule | PhasesVersionsGetResponseRulesItemExecuteRule | PhasesVersionsGetResponseRulesItemForceConnectionCloseRule | PhasesVersionsGetResponseRulesItemJSChallenge | PhasesVersionsGetResponseRulesItemLogRule | PhasesVersionsGetResponseRulesItemLogCustomFieldRule | PhasesVersionsGetResponseRulesItemManagedChallengeRule | PhasesVersionsGetResponseRulesItemRedirectRule | PhasesVersionsGetResponseRulesItemRewriteRule | PhasesVersionsGetResponseRulesItemRouteRule | PhasesVersionsGetResponseRulesItemScoreRule | PhasesVersionsGetResponseRulesItemServeErrorRule | PhasesVersionsGetResponseRulesItemSetCacheControl | PhasesVersionsGetResponseRulesItemSetCacheSettingsRule | PhasesVersionsGetResponseRulesItemSetCacheTags | PhasesVersionsGetResponseRulesItemSetConfigRule | PhasesVersionsGetResponseRulesItemSkipRule | PhasesVersionsGetResponseRulesItemTransformResponseHTML; export const PhasesVersionsGetResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type PhasesVersionsGetResponseRulesList = Array; export const PhasesVersionsGetResponseRulesList = /*@__PURE__*/ S.Array( PhasesVersionsGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPhasVersionResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: PhasesVersionsGetResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: PhasesVersionsGetResponsePhase; /** The list of rules in the ruleset. */ rules: PhasesVersionsGetResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const GetPhasVersionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: PhasesVersionsGetResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: PhasesVersionsGetResponsePhase, rules: PhasesVersionsGetResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPhasVersionResponse", }) as any as S.Schema; export interface GetPhasVersionForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The phase of the ruleset. */ rulesetPhase: string; /** The version of the ruleset. */ rulesetVersion: string; } export const GetPhasVersionForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), rulesetVersion: S.String.pipe(T.Label("ruleset_version")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPhasVersionForZoneRequest", }) as any as S.Schema; export interface GetRulesetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; } export const GetRulesetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets/{ruleset_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRulesetForAccountRequest", }) as any as S.Schema; export type GetResponseKind = "managed" | "custom" | "root" | "zone"; export const GetResponseKind = /*@__PURE__*/ S.String; export type GetResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const GetResponsePhase = /*@__PURE__*/ S.String; export type GetResponseRulesItemBlockRuleAction = "block"; export const GetResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const GetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type GetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const GetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type GetResponseRulesItemBlockRuleCategoriesList = Array; export const GetResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const GetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type GetResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemBlockRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemBlockRule", }) as any as S.Schema; export type GetResponseRulesItemChallengeAction = "challenge"; export const GetResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemChallengeCategoriesList = Array; export const GetResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const GetResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: GetResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(GetResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemChallengeRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemChallenge", }) as any as S.Schema; export type GetResponseRulesItemCompressResponseRuleAction = "compress_response"; export const GetResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface GetResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const GetResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: GetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "GetResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemCompressResponseRuleCategoriesList = Array; export const GetResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(GetResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr(GetResponseRulesItemCompressResponseRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemCompressResponseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type GetResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const GetResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const GetResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: GetResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemDDoSDynamicRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(GetResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type GetResponseRulesItemExecuteRuleAction = "execute"; export const GetResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const GetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type GetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const GetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( GetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type GetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const GetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface GetResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: GetResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: GetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const GetResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( GetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( GetResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( GetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "GetResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface GetResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: GetResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const GetResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr(GetResponseRulesItemExecuteRuleActionParametersOverrides), ), }), ).annotate({ identifier: "GetResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemExecuteRuleCategoriesList = Array; export const GetResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemExecuteRuleAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemExecuteRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemExecuteRule", }) as any as S.Schema; export type GetResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const GetResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const GetResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: GetResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(GetResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(GetResponseRulesItemForceConnectionCloseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type GetResponseRulesItemJSChallengeAction = "js_challenge"; export const GetResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemJSChallengeCategoriesList = Array; export const GetResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const GetResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: GetResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemJSChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(GetResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemJSChallengeRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemJSChallenge", }) as any as S.Schema; export type GetResponseRulesItemLogRuleAction = "log"; export const GetResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemLogRuleCategoriesList = Array; export const GetResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: GetResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional(S.NullOr(GetResponseRulesItemLogRuleCategoriesList)), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemLogRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemLogRule", }) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const GetResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const GetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type GetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const GetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const GetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type GetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const GetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const GetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type GetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const GetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const GetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type GetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const GetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const GetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type GetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const GetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface GetResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: GetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: GetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: GetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: GetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: GetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const GetResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( GetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( GetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( GetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( GetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( GetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "GetResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const GetResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(GetResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr(GetResponseRulesItemLogCustomFieldRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type GetResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const GetResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const GetResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: GetResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(GetResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(GetResponseRulesItemManagedChallengeRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type GetResponseRulesItemRedirectRuleAction = "redirect"; export const GetResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const GetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type GetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const GetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type GetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const GetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface GetResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: GetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const GetResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( GetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "GetResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface GetResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: GetResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const GetResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( GetResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "GetResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemRedirectRuleCategoriesList = Array; export const GetResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemRedirectRuleAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemRedirectRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemRedirectRule", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleAction = "rewrite"; export const GetResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleActionParametersHeaders = | GetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | GetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | GetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | GetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | GetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const GetResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type GetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const GetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type GetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const GetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type GetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const GetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type GetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const GetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type GetResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const GetResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface GetResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: GetResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: GetResponseRulesItemRewriteRuleActionParametersUri | null; } export const GetResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr(GetResponseRulesItemRewriteRuleActionParametersHeaders), ), uri: S.optional( S.NullOr(GetResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemRewriteRuleCategoriesList = Array; export const GetResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemRewriteRuleAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemRewriteRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemRewriteRule", }) as any as S.Schema; export type GetResponseRulesItemRouteRuleAction = "route"; export const GetResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const GetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type GetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const GetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type GetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const GetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type GetResponseRulesItemRouteRuleCategoriesList = Array; export const GetResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemRouteRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemRouteRule", }) as any as S.Schema; export type GetResponseRulesItemScoreRuleAction = "score"; export const GetResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const GetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type GetResponseRulesItemScoreRuleCategoriesList = Array; export const GetResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemScoreRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemScoreRule", }) as any as S.Schema; export type GetResponseRulesItemServeErrorRuleAction = "serve_error"; export const GetResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const GetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface GetResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: GetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const GetResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( GetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "GetResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type GetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const GetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface GetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: GetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const GetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( GetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "GetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type GetResponseRulesItemServeErrorRuleActionParameters = | GetResponseRulesItemServeErrorRuleActionParametersActionParametersContent | GetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const GetResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type GetResponseRulesItemServeErrorRuleCategoriesList = Array; export const GetResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemServeErrorRuleAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemServeErrorRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemServeErrorRule", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlAction = "set_cache_control"; export const GetResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersImmutable = | GetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | GetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersMaxAge = | GetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | GetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersMustRevalidate = | GetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | GetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersMustUnderstand = | GetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | GetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersNoCache = | GetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | GetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersNoStore = | GetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | GetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersNoTransform = | GetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | GetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersPrivate = | GetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | GetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | GetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersPublic = | GetResponseRulesItemSetCacheControlActionParametersPublicSetDirective | GetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersSMaxage = | GetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | GetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersStaleIfError = | GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | GetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface GetResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: GetResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: GetResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: GetResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: GetResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: GetResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: GetResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: GetResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: GetResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: GetResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: GetResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: GetResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: GetResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const GetResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr(GetResponseRulesItemSetCacheControlActionParametersImmutable), ), maxAge: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr(GetResponseRulesItemSetCacheControlActionParametersPrivate), ), proxyRevalidate: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr(GetResponseRulesItemSetCacheControlActionParametersPublic), ), sMaxage: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( GetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type GetResponseRulesItemSetCacheControlCategoriesList = Array; export const GetResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const GetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemSetCacheControlAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemSetCacheControlActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheControl", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const GetResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: GetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: GetResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const GetResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( GetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr(GetResponseRulesItemSetCacheSettingsRuleActionParametersVary), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const GetResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(GetResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr(GetResponseRulesItemSetCacheSettingsRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemSetCacheSettingsRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const GetResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsActionParameters = | GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | GetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | GetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | GetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const GetResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type GetResponseRulesItemSetCacheTagsCategoriesList = Array; export const GetResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const GetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemSetCacheTagsAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemSetCacheTagsRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemSetCacheTags", }) as any as S.Schema; export type GetResponseRulesItemSetConfigRuleAction = "set_config"; export const GetResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const GetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type GetResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const GetResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const GetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const GetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const GetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type GetResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const GetResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface GetResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: GetResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: GetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: GetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: GetResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: GetResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const GetResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr(GetResponseRulesItemSetConfigRuleActionParametersPolish), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( GetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( GetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( GetResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(GetResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "GetResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemSetConfigRuleCategoriesList = Array; export const GetResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemSetConfigRuleAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemSetConfigRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemSetConfigRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemSetConfigRule", }) as any as S.Schema; export type GetResponseRulesItemSkipRuleAction = "skip"; export const GetResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemSkipRuleActionParametersPhase = "current"; export const GetResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type GetResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const GetResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type GetResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const GetResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( GetResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type GetResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const GetResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type GetResponseRulesItemSkipRuleActionParametersProductsList = Array; export const GetResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( GetResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type GetResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const GetResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | GetResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const GetResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, GetResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type GetResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const GetResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type GetResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const GetResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: GetResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: GetResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: GetResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: GetResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: GetResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: GetResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const GetResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParametersPhasesList), ), products: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParametersProductsList), ), rules: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParametersRulesetsList), ), }), ).annotate({ identifier: "GetResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type GetResponseRulesItemSkipRuleCategoriesList = Array; export const GetResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const GetResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: GetResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: GetResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(GetResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(GetResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(GetResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(GetResponseRulesItemSkipRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemSkipRule", }) as any as S.Schema; export type GetResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const GetResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type GetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const GetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type GetResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const GetResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const GetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type GetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const GetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: GetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const GetResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: GetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "GetResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface GetResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: GetResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: GetResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: GetResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const GetResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(GetResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(GetResponseRulesItemTransformResponseHTMLCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(GetResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "GetResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type GetResponseRulesItem = | GetResponseRulesItemBlockRule | GetResponseRulesItemChallenge | GetResponseRulesItemCompressResponseRule | GetResponseRulesItemDDoSDynamicRule | GetResponseRulesItemExecuteRule | GetResponseRulesItemForceConnectionCloseRule | GetResponseRulesItemJSChallenge | GetResponseRulesItemLogRule | GetResponseRulesItemLogCustomFieldRule | GetResponseRulesItemManagedChallengeRule | GetResponseRulesItemRedirectRule | GetResponseRulesItemRewriteRule | GetResponseRulesItemRouteRule | GetResponseRulesItemScoreRule | GetResponseRulesItemServeErrorRule | GetResponseRulesItemSetCacheControl | GetResponseRulesItemSetCacheSettingsRule | GetResponseRulesItemSetCacheTags | GetResponseRulesItemSetConfigRule | GetResponseRulesItemSkipRule | GetResponseRulesItemTransformResponseHTML; export const GetResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type GetResponseRulesList = Array; export const GetResponseRulesList = /*@__PURE__*/ S.Array( GetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetRulesetResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: GetResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: GetResponsePhase; /** The list of rules in the ruleset. */ rules: GetResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const GetRulesetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: GetResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: GetResponsePhase, rules: GetResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRulesetResponse", }) as any as S.Schema; export interface GetRulesetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; } export const GetRulesetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets/{ruleset_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRulesetForZoneRequest", }) as any as S.Schema; export interface GetVersionForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The version of the ruleset. */ rulesetVersion: string; } export const GetVersionForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), rulesetVersion: S.String.pipe(T.Label("ruleset_version")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetVersionForAccountRequest", }) as any as S.Schema; export type VersionsGetResponseKind = "managed" | "custom" | "root" | "zone"; export const VersionsGetResponseKind = /*@__PURE__*/ S.String; export type VersionsGetResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const VersionsGetResponsePhase = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemBlockRuleAction = "block"; export const VersionsGetResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const VersionsGetResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type VersionsGetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const VersionsGetResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type VersionsGetResponseRulesItemBlockRuleCategoriesList = Array; export const VersionsGetResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const VersionsGetResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type VersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(VersionsGetResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemBlockRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemChallengeAction = "challenge"; export const VersionsGetResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemChallengeCategoriesList = Array; export const VersionsGetResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(VersionsGetResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemChallenge", }) as any as S.Schema; export type VersionsGetResponseRulesItemCompressResponseRuleAction = "compress_response"; export const VersionsGetResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface VersionsGetResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const VersionsGetResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: VersionsGetResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "VersionsGetResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemCompressResponseRuleCategoriesList = Array; export const VersionsGetResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( VersionsGetResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( VersionsGetResponseRulesItemCompressResponseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const VersionsGetResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const VersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleAction = "execute"; export const VersionsGetResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const VersionsGetResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const VersionsGetResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( VersionsGetResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface VersionsGetResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: VersionsGetResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const VersionsGetResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( VersionsGetResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleCategoriesList = Array; export const VersionsGetResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemExecuteRuleAction), ), actionParameters: S.optional( S.NullOr(VersionsGetResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemExecuteRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const VersionsGetResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const VersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( VersionsGetResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemJSChallengeAction = "js_challenge"; export const VersionsGetResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemJSChallengeCategoriesList = Array; export const VersionsGetResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemJSChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemJSChallenge", }) as any as S.Schema; export type VersionsGetResponseRulesItemLogRuleAction = "log"; export const VersionsGetResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemLogRuleCategoriesList = Array; export const VersionsGetResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(VersionsGetResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemLogRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemLogRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const VersionsGetResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface VersionsGetResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const VersionsGetResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( VersionsGetResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( VersionsGetResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const VersionsGetResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const VersionsGetResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( VersionsGetResponseRulesItemManagedChallengeRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemRedirectRuleAction = "redirect"; export const VersionsGetResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const VersionsGetResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type VersionsGetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const VersionsGetResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type VersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const VersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface VersionsGetResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: VersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const VersionsGetResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( VersionsGetResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface VersionsGetResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: VersionsGetResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const VersionsGetResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( VersionsGetResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemRedirectRuleCategoriesList = Array; export const VersionsGetResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr(VersionsGetResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRedirectRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleAction = "rewrite"; export const VersionsGetResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleActionParametersHeaders = | VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | VersionsGetResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const VersionsGetResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const VersionsGetResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type VersionsGetResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const VersionsGetResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface VersionsGetResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: VersionsGetResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: VersionsGetResponseRulesItemRewriteRuleActionParametersUri | null; } export const VersionsGetResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr( VersionsGetResponseRulesItemRewriteRuleActionParametersHeaders, ), ), uri: S.optional( S.NullOr(VersionsGetResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleCategoriesList = Array; export const VersionsGetResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemRewriteRuleAction), ), actionParameters: S.optional( S.NullOr(VersionsGetResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRewriteRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemRouteRuleAction = "route"; export const VersionsGetResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const VersionsGetResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type VersionsGetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const VersionsGetResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type VersionsGetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const VersionsGetResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type VersionsGetResponseRulesItemRouteRuleCategoriesList = Array; export const VersionsGetResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(VersionsGetResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemRouteRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemScoreRuleAction = "score"; export const VersionsGetResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const VersionsGetResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type VersionsGetResponseRulesItemScoreRuleCategoriesList = Array; export const VersionsGetResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(VersionsGetResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemScoreRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemServeErrorRuleAction = "serve_error"; export const VersionsGetResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type VersionsGetResponseRulesItemServeErrorRuleActionParameters = | VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersContent | VersionsGetResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const VersionsGetResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type VersionsGetResponseRulesItemServeErrorRuleCategoriesList = Array; export const VersionsGetResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr( VersionsGetResponseRulesItemServeErrorRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemServeErrorRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlAction = "set_cache_control"; export const VersionsGetResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersImmutable = | VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge = | VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate = | VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand = | VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoCache = | VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoStore = | VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform = | VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersPrivate = | VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersPublic = | VersionsGetResponseRulesItemSetCacheControlActionParametersPublicSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage = | VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError = | VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface VersionsGetResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: VersionsGetResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: VersionsGetResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: VersionsGetResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: VersionsGetResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: VersionsGetResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const VersionsGetResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlCategoriesList = Array; export const VersionsGetResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheControl", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const VersionsGetResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( VersionsGetResponseRulesItemSetCacheSettingsRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const VersionsGetResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsActionParameters = | VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | VersionsGetResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | VersionsGetResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | VersionsGetResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const VersionsGetResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type VersionsGetResponseRulesItemSetCacheTagsCategoriesList = Array; export const VersionsGetResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetCacheTags", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetConfigRuleAction = "set_config"; export const VersionsGetResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const VersionsGetResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type VersionsGetResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const VersionsGetResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const VersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const VersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const VersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const VersionsGetResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface VersionsGetResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: VersionsGetResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: VersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: VersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: VersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: VersionsGetResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const VersionsGetResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr( VersionsGetResponseRulesItemSetConfigRuleActionParametersPolish, ), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( VersionsGetResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( VersionsGetResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( VersionsGetResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(VersionsGetResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemSetConfigRuleCategoriesList = Array; export const VersionsGetResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr( VersionsGetResponseRulesItemSetConfigRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSetConfigRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleAction = "skip"; export const VersionsGetResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSkipRuleActionParametersPhase = "current"; export const VersionsGetResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const VersionsGetResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const VersionsGetResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( VersionsGetResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const VersionsGetResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSkipRuleActionParametersProductsList = Array; export const VersionsGetResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( VersionsGetResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const VersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | VersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const VersionsGetResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, VersionsGetResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const VersionsGetResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const VersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: VersionsGetResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: VersionsGetResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: VersionsGetResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: VersionsGetResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: VersionsGetResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: VersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const VersionsGetResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(VersionsGetResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr( VersionsGetResponseRulesItemSkipRuleActionParametersPhasesList, ), ), products: S.optional( S.NullOr( VersionsGetResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr(VersionsGetResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(VersionsGetResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr( VersionsGetResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleCategoriesList = Array; export const VersionsGetResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: VersionsGetResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(VersionsGetResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(VersionsGetResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(VersionsGetResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemSkipRule", }) as any as S.Schema; export type VersionsGetResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const VersionsGetResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type VersionsGetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const VersionsGetResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type VersionsGetResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const VersionsGetResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type VersionsGetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const VersionsGetResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type VersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const VersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface VersionsGetResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: VersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const VersionsGetResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: VersionsGetResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "VersionsGetResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface VersionsGetResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: VersionsGetResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: VersionsGetResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: VersionsGetResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const VersionsGetResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(VersionsGetResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( VersionsGetResponseRulesItemTransformResponseHTMLCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(VersionsGetResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsGetResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type VersionsGetResponseRulesItem = | VersionsGetResponseRulesItemBlockRule | VersionsGetResponseRulesItemChallenge | VersionsGetResponseRulesItemCompressResponseRule | VersionsGetResponseRulesItemDDoSDynamicRule | VersionsGetResponseRulesItemExecuteRule | VersionsGetResponseRulesItemForceConnectionCloseRule | VersionsGetResponseRulesItemJSChallenge | VersionsGetResponseRulesItemLogRule | VersionsGetResponseRulesItemLogCustomFieldRule | VersionsGetResponseRulesItemManagedChallengeRule | VersionsGetResponseRulesItemRedirectRule | VersionsGetResponseRulesItemRewriteRule | VersionsGetResponseRulesItemRouteRule | VersionsGetResponseRulesItemScoreRule | VersionsGetResponseRulesItemServeErrorRule | VersionsGetResponseRulesItemSetCacheControl | VersionsGetResponseRulesItemSetCacheSettingsRule | VersionsGetResponseRulesItemSetCacheTags | VersionsGetResponseRulesItemSetConfigRule | VersionsGetResponseRulesItemSkipRule | VersionsGetResponseRulesItemTransformResponseHTML; export const VersionsGetResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type VersionsGetResponseRulesList = Array; export const VersionsGetResponseRulesList = /*@__PURE__*/ S.Array( VersionsGetResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetVersionResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: VersionsGetResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: VersionsGetResponsePhase; /** The list of rules in the ruleset. */ rules: VersionsGetResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const GetVersionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: VersionsGetResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: VersionsGetResponsePhase, rules: VersionsGetResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetVersionResponse", }) as any as S.Schema; export interface GetVersionForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The version of the ruleset. */ rulesetVersion: string; } export const GetVersionForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), rulesetVersion: S.String.pipe(T.Label("ruleset_version")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetVersionForZoneRequest", }) as any as S.Schema; export interface ListPhasVersionsForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The phase of the ruleset. */ rulesetPhase: string; } export const ListPhasVersionsForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPhasVersionsForAccountRequest", }) as any as S.Schema; export type PhasesVersionsListResultItemKind = | "managed" | "custom" | "root" | "zone"; export const PhasesVersionsListResultItemKind = /*@__PURE__*/ S.String; export type PhasesVersionsListResultItemPhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesVersionsListResultItemPhase = /*@__PURE__*/ S.String; export interface PhasesVersionsListResultItem { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: PhasesVersionsListResultItemKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: PhasesVersionsListResultItemPhase; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const PhasesVersionsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: PhasesVersionsListResultItemKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: PhasesVersionsListResultItemPhase, version: S.String, description: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesVersionsListResultItem", }) as any as S.Schema; export type PhasesVersionsListResultList = Array; export const PhasesVersionsListResultList = /*@__PURE__*/ S.Array( PhasesVersionsListResultItem, ) as any as S.Schema; export interface ListPhasVersionsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PhasesVersionsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPhasVersionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PhasesVersionsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPhasVersionsResponse", }) as any as S.Schema; export interface ListPhasVersionsForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The phase of the ruleset. */ rulesetPhase: string; } export const ListPhasVersionsForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPhasVersionsForZoneRequest", }) as any as S.Schema; export interface ListRulesetsForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The cursor to use for the next page. */ cursor?: string; /** The number of rulesets to return per page. */ perPage?: number; } export const ListRulesetsForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cursor: S.optional(S.String.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRulesetsForAccountRequest", }) as any as S.Schema; export type ListResultItemKind = "managed" | "custom" | "root" | "zone"; export const ListResultItemKind = /*@__PURE__*/ S.String; export type ListResultItemPhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const ListResultItemPhase = /*@__PURE__*/ S.String; export interface ListResultItem { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: ListResultItemKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: ListResultItemPhase; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const ListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: ListResultItemKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: ListResultItemPhase, version: S.String, description: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListResultItem" }) as any as S.Schema; export type ListResultList = Array; export const ListResultList = /*@__PURE__*/ S.Array( ListResultItem, ) as any as S.Schema; export interface ListRulesetsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListRulesetsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRulesetsResponse", }) as any as S.Schema; export interface ListRulesetsForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The cursor to use for the next page. */ cursor?: string; /** The number of rulesets to return per page. */ perPage?: number; } export const ListRulesetsForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), cursor: S.optional(S.String.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets", code: 200 }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRulesetsForZoneRequest", }) as any as S.Schema; export interface ListVersionsForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; } export const ListVersionsForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rulesets/{ruleset_id}/versions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListVersionsForAccountRequest", }) as any as S.Schema; export type VersionsListResultItemKind = "managed" | "custom" | "root" | "zone"; export const VersionsListResultItemKind = /*@__PURE__*/ S.String; export type VersionsListResultItemPhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const VersionsListResultItemPhase = /*@__PURE__*/ S.String; export interface VersionsListResultItem { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: VersionsListResultItemKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: VersionsListResultItemPhase; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const VersionsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: VersionsListResultItemKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: VersionsListResultItemPhase, version: S.String, description: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "VersionsListResultItem", }) as any as S.Schema; export type VersionsListResultList = Array; export const VersionsListResultList = /*@__PURE__*/ S.Array( VersionsListResultItem, ) as any as S.Schema; export interface ListVersionsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: VersionsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListVersionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: VersionsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListVersionsResponse", }) as any as S.Schema; export interface ListVersionsForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; } export const ListVersionsForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/rulesets/{ruleset_id}/versions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListVersionsForZoneRequest", }) as any as S.Schema; export type RulesEditRequestBodyBlockRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyBlockRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyBlockRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyBlockRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyBlockRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyBlockRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyBlockRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyBlockRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyBlockRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyBlockRulePosition; } export const RulesEditRequestBodyBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyBlockRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyBlockRule", }) as any as S.Schema; export type RulesEditRequestBodyChallengeRuleAction = "challenge"; export const RulesEditRequestBodyChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesEditRequestBodyChallengeRuleCategoriesList = Array; export const RulesEditRequestBodyChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditRequestBodyChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditRequestBodyChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditRequestBodyChallengeRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const RulesEditRequestBodyChallengeRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type RulesEditRequestBodyChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyChallengeRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyChallengeRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesEditRequestBodyChallengeRuleRatelimitCharacteristicsList = Array; export const RulesEditRequestBodyChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodyChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditRequestBodyChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesEditRequestBodyChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditRequestBodyChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditRequestBodyChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesEditRequestBodyChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesEditRequestBodyChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: RulesEditRequestBodyChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyChallengeRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditRequestBodyChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesEditRequestBodyChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesEditRequestBodyChallengeRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(RulesEditRequestBodyChallengeRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesEditRequestBodyChallengeRulePosition), ratelimit: S.optional(RulesEditRequestBodyChallengeRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesEditRequestBodyChallengeRule", }) as any as S.Schema; export type RulesEditRequestBodyResponseCompressionRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyResponseCompressionRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyResponseCompressionRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyResponseCompressionRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyResponseCompressionRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyResponseCompressionRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyResponseCompressionRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyResponseCompressionRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyResponseCompressionRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyResponseCompressionRulePosition; } export const RulesEditRequestBodyResponseCompressionRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyResponseCompressionRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyResponseCompressionRule", }) as any as S.Schema; export type RulesEditRequestBodyDDoSDynamicRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyDDoSDynamicRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyDDoSDynamicRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyDDoSDynamicRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyDDoSDynamicRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyDDoSDynamicRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyDDoSDynamicRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyDDoSDynamicRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyDDoSDynamicRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyDDoSDynamicRulePosition; } export const RulesEditRequestBodyDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyDDoSDynamicRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyDDoSDynamicRule", }) as any as S.Schema; export type RulesEditRequestBodyExecuteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyExecuteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyExecuteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyExecuteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyExecuteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyExecuteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyExecuteRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyExecuteRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyExecuteRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyExecuteRulePosition; } export const RulesEditRequestBodyExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyExecuteRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyExecuteRule", }) as any as S.Schema; export type RulesEditRequestBodyForceConnectionCloseRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyForceConnectionCloseRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyForceConnectionCloseRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyForceConnectionCloseRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyForceConnectionCloseRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyForceConnectionCloseRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyForceConnectionCloseRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyForceConnectionCloseRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyForceConnectionCloseRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyForceConnectionCloseRulePosition; } export const RulesEditRequestBodyForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional( RulesEditRequestBodyForceConnectionCloseRulePosition, ), }), ).annotate({ identifier: "RulesEditRequestBodyForceConnectionCloseRule", }) as any as S.Schema; export type RulesEditRequestBodyJavaScriptChallengeRuleAction = "js_challenge"; export const RulesEditRequestBodyJavaScriptChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesEditRequestBodyJavaScriptChallengeRuleCategoriesList = Array; export const RulesEditRequestBodyJavaScriptChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditRequestBodyJavaScriptChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditRequestBodyJavaScriptChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditRequestBodyJavaScriptChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyJavaScriptChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyJavaScriptChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyJavaScriptChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyJavaScriptChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyJavaScriptChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyJavaScriptChallengeRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyJavaScriptChallengeRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesEditRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList = Array; export const RulesEditRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodyJavaScriptChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesEditRequestBodyJavaScriptChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditRequestBodyJavaScriptChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditRequestBodyJavaScriptChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesEditRequestBodyJavaScriptChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesEditRequestBodyJavaScriptChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: RulesEditRequestBodyJavaScriptChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyJavaScriptChallengeRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditRequestBodyJavaScriptChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesEditRequestBodyJavaScriptChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesEditRequestBodyJavaScriptChallengeRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( RulesEditRequestBodyJavaScriptChallengeRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesEditRequestBodyJavaScriptChallengeRulePosition), ratelimit: S.optional( RulesEditRequestBodyJavaScriptChallengeRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesEditRequestBodyJavaScriptChallengeRule", }) as any as S.Schema; export type RulesEditRequestBodyLogRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyLogRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyLogRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyLogRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyLogRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyLogRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyLogRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyLogRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyLogRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyLogRulePosition; } export const RulesEditRequestBodyLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyLogRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyLogRule", }) as any as S.Schema; export type RulesEditRequestBodyLogCustomFieldRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyLogCustomFieldRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyLogCustomFieldRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyLogCustomFieldRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyLogCustomFieldRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyLogCustomFieldRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyLogCustomFieldRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyLogCustomFieldRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyLogCustomFieldRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyLogCustomFieldRulePosition; } export const RulesEditRequestBodyLogCustomFieldRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesEditRequestBodyLogCustomFieldRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyLogCustomFieldRule", }) as any as S.Schema; export type RulesEditRequestBodyManagedChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyManagedChallengeRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyManagedChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyManagedChallengeRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyManagedChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyManagedChallengeRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyManagedChallengeRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyManagedChallengeRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyManagedChallengeRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyManagedChallengeRulePosition; } export const RulesEditRequestBodyManagedChallengeRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesEditRequestBodyManagedChallengeRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyManagedChallengeRule", }) as any as S.Schema; export type RulesEditRequestBodyRedirectRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyRedirectRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyRedirectRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyRedirectRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyRedirectRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyRedirectRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyRedirectRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyRedirectRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyRedirectRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyRedirectRulePosition; } export const RulesEditRequestBodyRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyRedirectRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyRedirectRule", }) as any as S.Schema; export type RulesEditRequestBodyRewriteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyRewriteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyRewriteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyRewriteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyRewriteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyRewriteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyRewriteRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyRewriteRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyRewriteRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyRewriteRulePosition; } export const RulesEditRequestBodyRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyRewriteRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyRewriteRule", }) as any as S.Schema; export type RulesEditRequestBodyRouteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyRouteRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyRouteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyRouteRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyRouteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyRouteRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyRouteRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyRouteRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyRouteRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyRouteRulePosition; } export const RulesEditRequestBodyRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyRouteRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyRouteRule", }) as any as S.Schema; export type RulesEditRequestBodyScoreRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyScoreRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyScoreRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyScoreRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyScoreRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyScoreRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyScoreRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyScoreRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyScoreRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyScoreRulePosition; } export const RulesEditRequestBodyScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyScoreRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyScoreRule", }) as any as S.Schema; export type RulesEditRequestBodyServeErrorRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyServeErrorRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyServeErrorRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyServeErrorRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyServeErrorRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyServeErrorRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyServeErrorRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyServeErrorRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodyServeErrorRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyServeErrorRulePosition; } export const RulesEditRequestBodyServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodyServeErrorRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodyServeErrorRule", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleAction = "set_cache_control"; export const RulesEditRequestBodySetCacheControlRuleAction = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersImmutable = | RulesEditRequestBodySetCacheControlRuleActionParametersImmutableSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersImmutableRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersMaxAge = | RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersMaxAgeRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidate = | RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidateRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstand = | RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstandRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList = Array; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList; } export const RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoCache = | RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersNoCacheRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoStore = | RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersNoStoreRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersNoTransform = | RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersNoTransformRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList = Array; export const RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList; } export const RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersPrivate = | RulesEditRequestBodySetCacheControlRuleActionParametersPrivateSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersPrivateRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidate = | RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidateRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersPublic = | RulesEditRequestBodySetCacheControlRuleActionParametersPublicSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersPublicRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersSMaxage = | RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersSMaxageRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfError = | RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfErrorRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate = | RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective | RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective; export const RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface RulesEditRequestBodySetCacheControlRuleActionParameters { /** A cache-control directive configuration. */ immutable?: RulesEditRequestBodySetCacheControlRuleActionParametersImmutable; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: RulesEditRequestBodySetCacheControlRuleActionParametersMaxAge; /** A cache-control directive configuration. */ mustRevalidate?: RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidate; /** A cache-control directive configuration. */ mustUnderstand?: RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstand; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: RulesEditRequestBodySetCacheControlRuleActionParametersNoCache; /** A cache-control directive configuration. */ noStore?: RulesEditRequestBodySetCacheControlRuleActionParametersNoStore; /** A cache-control directive configuration. */ noTransform?: RulesEditRequestBodySetCacheControlRuleActionParametersNoTransform; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: RulesEditRequestBodySetCacheControlRuleActionParametersPrivate; /** A cache-control directive configuration. */ proxyRevalidate?: RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidate; /** A cache-control directive configuration. */ public?: RulesEditRequestBodySetCacheControlRuleActionParametersPublic; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: RulesEditRequestBodySetCacheControlRuleActionParametersSMaxage; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfError; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate; } export const RulesEditRequestBodySetCacheControlRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersImmutable, ), maxAge: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersMaxAge.pipe( T.Body("max-age"), ), ), mustRevalidate: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersMustRevalidate.pipe( T.Body("must-revalidate"), ), ), mustUnderstand: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersMustUnderstand.pipe( T.Body("must-understand"), ), ), noCache: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersNoCache.pipe( T.Body("no-cache"), ), ), noStore: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersNoStore.pipe( T.Body("no-store"), ), ), noTransform: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersNoTransform.pipe( T.Body("no-transform"), ), ), private: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersPrivate, ), proxyRevalidate: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersProxyRevalidate.pipe( T.Body("proxy-revalidate"), ), ), public: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersPublic, ), sMaxage: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersSMaxage.pipe( T.Body("s-maxage"), ), ), staleIfError: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersStaleIfError.pipe( T.Body("stale-if-error"), ), ), staleWhileRevalidate: S.optional( RulesEditRequestBodySetCacheControlRuleActionParametersStaleWhileRevalidate.pipe( T.Body("stale-while-revalidate"), ), ), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleActionParameters", }) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleCategoriesList = Array; export const RulesEditRequestBodySetCacheControlRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditRequestBodySetCacheControlRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditRequestBodySetCacheControlRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditRequestBodySetCacheControlRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodySetCacheControlRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodySetCacheControlRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodySetCacheControlRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodySetCacheControlRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetCacheControlRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodySetCacheControlRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetCacheControlRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesEditRequestBodySetCacheControlRuleRatelimitCharacteristicsList = Array; export const RulesEditRequestBodySetCacheControlRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheControlRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditRequestBodySetCacheControlRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesEditRequestBodySetCacheControlRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditRequestBodySetCacheControlRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRuleRatelimit", }) as any as S.Schema; export interface RulesEditRequestBodySetCacheControlRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesEditRequestBodySetCacheControlRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesEditRequestBodySetCacheControlRuleActionParameters; /** The categories of the rule. */ categories?: RulesEditRequestBodySetCacheControlRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodySetCacheControlRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditRequestBodySetCacheControlRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesEditRequestBodySetCacheControlRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(RulesEditRequestBodySetCacheControlRuleAction), actionParameters: S.optional( RulesEditRequestBodySetCacheControlRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( RulesEditRequestBodySetCacheControlRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesEditRequestBodySetCacheControlRulePosition), ratelimit: S.optional(RulesEditRequestBodySetCacheControlRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheControlRule", }) as any as S.Schema; export type RulesEditRequestBodySetCacheSettingsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodySetCacheSettingsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodySetCacheSettingsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodySetCacheSettingsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodySetCacheSettingsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetCacheSettingsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodySetCacheSettingsRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetCacheSettingsRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodySetCacheSettingsRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodySetCacheSettingsRulePosition; } export const RulesEditRequestBodySetCacheSettingsRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesEditRequestBodySetCacheSettingsRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheSettingsRule", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleAction = "set_cache_tags"; export const RulesEditRequestBodySetCacheTagsRuleAction = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList = Array; export const RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList; } export const RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesOperation, values: RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation | (string & {}); } export const RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList = Array; export const RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList; } export const RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation, values: RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation | (string & {}); } export const RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList = Array; export const RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList; } export const RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesOperation, values: RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation | (string & {}); } export const RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleActionParameters = | RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsValues | RulesEditRequestBodySetCacheTagsRuleActionParametersAddCacheTagsExpression | RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsValues | RulesEditRequestBodySetCacheTagsRuleActionParametersRemoveCacheTagsExpression | RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsValues | RulesEditRequestBodySetCacheTagsRuleActionParametersSetCacheTagsExpression; export const RulesEditRequestBodySetCacheTagsRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type RulesEditRequestBodySetCacheTagsRuleCategoriesList = Array; export const RulesEditRequestBodySetCacheTagsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditRequestBodySetCacheTagsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditRequestBodySetCacheTagsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditRequestBodySetCacheTagsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodySetCacheTagsRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodySetCacheTagsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodySetCacheTagsRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodySetCacheTagsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetCacheTagsRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodySetCacheTagsRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetCacheTagsRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesEditRequestBodySetCacheTagsRuleRatelimitCharacteristicsList = Array; export const RulesEditRequestBodySetCacheTagsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodySetCacheTagsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditRequestBodySetCacheTagsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesEditRequestBodySetCacheTagsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditRequestBodySetCacheTagsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRuleRatelimit", }) as any as S.Schema; export interface RulesEditRequestBodySetCacheTagsRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesEditRequestBodySetCacheTagsRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesEditRequestBodySetCacheTagsRuleActionParameters; /** The categories of the rule. */ categories?: RulesEditRequestBodySetCacheTagsRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodySetCacheTagsRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditRequestBodySetCacheTagsRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesEditRequestBodySetCacheTagsRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(RulesEditRequestBodySetCacheTagsRuleAction), actionParameters: S.optional( RulesEditRequestBodySetCacheTagsRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( RulesEditRequestBodySetCacheTagsRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional(RulesEditRequestBodySetCacheTagsRulePosition), ratelimit: S.optional(RulesEditRequestBodySetCacheTagsRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesEditRequestBodySetCacheTagsRule", }) as any as S.Schema; export type RulesEditRequestBodySetConfigurationRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodySetConfigurationRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodySetConfigurationRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodySetConfigurationRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodySetConfigurationRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetConfigurationRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodySetConfigurationRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySetConfigurationRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodySetConfigurationRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodySetConfigurationRulePosition; } export const RulesEditRequestBodySetConfigurationRule = /*@__PURE__*/ S.suspend( () => S.Struct({ position: S.optional(RulesEditRequestBodySetConfigurationRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodySetConfigurationRule", }) as any as S.Schema; export type RulesEditRequestBodySkipRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodySkipRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodySkipRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodySkipRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodySkipRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySkipRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodySkipRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodySkipRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export interface RulesEditRequestBodySkipRule { /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodySkipRulePosition; } export const RulesEditRequestBodySkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ position: S.optional(RulesEditRequestBodySkipRulePosition), }), ).annotate({ identifier: "RulesEditRequestBodySkipRule", }) as any as S.Schema; export type RulesEditRequestBodyTransformResponseHTMLRuleAction = "transform_response_html"; export const RulesEditRequestBodyTransformResponseHTMLRuleAction = /*@__PURE__*/ S.String; export type RulesEditRequestBodyTransformResponseHTMLRuleActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const RulesEditRequestBodyTransformResponseHTMLRuleActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type RulesEditRequestBodyTransformResponseHTMLRuleCategoriesList = Array; export const RulesEditRequestBodyTransformResponseHTMLRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditRequestBodyTransformResponseHTMLRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditRequestBodyTransformResponseHTMLRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditRequestBodyTransformResponseHTMLRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export const RulesEditRequestBodyTransformResponseHTMLRulePositionBeforePosition = RulesCreateRequestBodyBlockRulePositionBeforePosition; export type RulesEditRequestBodyTransformResponseHTMLRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export const RulesEditRequestBodyTransformResponseHTMLRulePositionAfterPosition = RulesCreateRequestBodyBlockRulePositionAfterPosition; export type RulesEditRequestBodyTransformResponseHTMLRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyTransformResponseHTMLRulePositionIndexPosition = RulesCreateRequestBodyBlockRulePositionIndexPosition; export type RulesEditRequestBodyTransformResponseHTMLRulePosition = | RulesCreateRequestBodyBlockRulePositionBeforePosition | RulesCreateRequestBodyBlockRulePositionAfterPosition | RulesCreateRequestBodyBlockRulePositionIndexPosition; export const RulesEditRequestBodyTransformResponseHTMLRulePosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["before"], ["after"], ["index"]]), ); export type RulesEditRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList = Array; export const RulesEditRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestBodyTransformResponseHTMLRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const RulesEditRequestBodyTransformResponseHTMLRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditRequestBodyTransformResponseHTMLRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditRequestBodyTransformResponseHTMLRuleRatelimit", }) as any as S.Schema; export interface RulesEditRequestBodyTransformResponseHTMLRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: RulesEditRequestBodyTransformResponseHTMLRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; /** The categories of the rule. */ categories?: RulesEditRequestBodyTransformResponseHTMLRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring where the rule will be placed. */ position?: RulesEditRequestBodyTransformResponseHTMLRulePosition; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditRequestBodyTransformResponseHTMLRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const RulesEditRequestBodyTransformResponseHTMLRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(RulesEditRequestBodyTransformResponseHTMLRuleAction), actionParameters: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( RulesEditRequestBodyTransformResponseHTMLRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), position: S.optional( RulesEditRequestBodyTransformResponseHTMLRulePosition, ), ratelimit: S.optional( RulesEditRequestBodyTransformResponseHTMLRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "RulesEditRequestBodyTransformResponseHTMLRule", }) as any as S.Schema; export type RulesEditRequestBody = | RulesEditRequestBodyBlockRule | RulesEditRequestBodyChallengeRule | RulesEditRequestBodyResponseCompressionRule | RulesEditRequestBodyDDoSDynamicRule | RulesEditRequestBodyExecuteRule | RulesEditRequestBodyForceConnectionCloseRule | RulesEditRequestBodyJavaScriptChallengeRule | RulesEditRequestBodyLogRule | RulesEditRequestBodyLogCustomFieldRule | RulesEditRequestBodyManagedChallengeRule | RulesEditRequestBodyRedirectRule | RulesEditRequestBodyRewriteRule | RulesEditRequestBodyRouteRule | RulesEditRequestBodyScoreRule | RulesEditRequestBodyServeErrorRule | RulesEditRequestBodySetCacheControlRule | RulesEditRequestBodySetCacheSettingsRule | RulesEditRequestBodySetCacheTagsRule | RulesEditRequestBodySetConfigurationRule | RulesEditRequestBodySkipRule | RulesEditRequestBodyTransformResponseHTMLRule; export const RulesEditRequestBody = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], ["position"], ["position"], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], ["position"], ["position"], ["position"], ["position"], ["position"], ["position"], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ["position"], ["position"], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "position", "ratelimit", "ref", ], ]), ); export interface PatchRuleForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The unique ID of the rule. */ ruleId: string; body: RulesEditRequestBody; } export const PatchRuleForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), ruleId: S.String.pipe(T.Label("rule_id")), body: RulesEditRequestBody.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/rulesets/{ruleset_id}/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRuleForAccountRequest", }) as any as S.Schema; export type RulesEditResponseKind = "managed" | "custom" | "root" | "zone"; export const RulesEditResponseKind = /*@__PURE__*/ S.String; export type RulesEditResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const RulesEditResponsePhase = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemBlockRuleAction = "block"; export const RulesEditResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const RulesEditResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type RulesEditResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const RulesEditResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type RulesEditResponseRulesItemBlockRuleCategoriesList = Array; export const RulesEditResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const RulesEditResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type RulesEditResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemBlockRule", }) as any as S.Schema; export type RulesEditResponseRulesItemChallengeAction = "challenge"; export const RulesEditResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemChallengeCategoriesList = Array; export const RulesEditResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemChallenge", }) as any as S.Schema; export type RulesEditResponseRulesItemCompressResponseRuleAction = "compress_response"; export const RulesEditResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface RulesEditResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const RulesEditResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: RulesEditResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "RulesEditResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemCompressResponseRuleCategoriesList = Array; export const RulesEditResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( RulesEditResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemCompressResponseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type RulesEditResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const RulesEditResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const RulesEditResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleAction = "execute"; export const RulesEditResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const RulesEditResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const RulesEditResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: RulesEditResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const RulesEditResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( RulesEditResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface RulesEditResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: RulesEditResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const RulesEditResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( RulesEditResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleCategoriesList = Array; export const RulesEditResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemExecuteRuleAction)), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemExecuteRule", }) as any as S.Schema; export type RulesEditResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const RulesEditResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const RulesEditResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( RulesEditResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type RulesEditResponseRulesItemJSChallengeAction = "js_challenge"; export const RulesEditResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemJSChallengeCategoriesList = Array; export const RulesEditResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemJSChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemJSChallenge", }) as any as S.Schema; export type RulesEditResponseRulesItemLogRuleAction = "log"; export const RulesEditResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemLogRuleCategoriesList = Array; export const RulesEditResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(RulesEditResponseRulesItemLogRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemLogRule", }) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const RulesEditResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type RulesEditResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface RulesEditResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: RulesEditResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: RulesEditResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: RulesEditResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const RulesEditResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( RulesEditResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( RulesEditResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( RulesEditResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( RulesEditResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( RulesEditResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type RulesEditResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const RulesEditResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const RulesEditResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemManagedChallengeRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type RulesEditResponseRulesItemRedirectRuleAction = "redirect"; export const RulesEditResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const RulesEditResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type RulesEditResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const RulesEditResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type RulesEditResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const RulesEditResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface RulesEditResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: RulesEditResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const RulesEditResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( RulesEditResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface RulesEditResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: RulesEditResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const RulesEditResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( RulesEditResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemRedirectRuleCategoriesList = Array; export const RulesEditResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemRedirectRule", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleAction = "rewrite"; export const RulesEditResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleActionParametersHeaders = | RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | RulesEditResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | RulesEditResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | RulesEditResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const RulesEditResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type RulesEditResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const RulesEditResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type RulesEditResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const RulesEditResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type RulesEditResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const RulesEditResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type RulesEditResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const RulesEditResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type RulesEditResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const RulesEditResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface RulesEditResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: RulesEditResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: RulesEditResponseRulesItemRewriteRuleActionParametersUri | null; } export const RulesEditResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr(RulesEditResponseRulesItemRewriteRuleActionParametersHeaders), ), uri: S.optional( S.NullOr(RulesEditResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleCategoriesList = Array; export const RulesEditResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemRewriteRuleAction)), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemRewriteRule", }) as any as S.Schema; export type RulesEditResponseRulesItemRouteRuleAction = "route"; export const RulesEditResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const RulesEditResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type RulesEditResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const RulesEditResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type RulesEditResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const RulesEditResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type RulesEditResponseRulesItemRouteRuleCategoriesList = Array; export const RulesEditResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemRouteRule", }) as any as S.Schema; export type RulesEditResponseRulesItemScoreRuleAction = "score"; export const RulesEditResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const RulesEditResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type RulesEditResponseRulesItemScoreRuleCategoriesList = Array; export const RulesEditResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemScoreRule", }) as any as S.Schema; export type RulesEditResponseRulesItemServeErrorRuleAction = "serve_error"; export const RulesEditResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type RulesEditResponseRulesItemServeErrorRuleActionParameters = | RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersContent | RulesEditResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const RulesEditResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type RulesEditResponseRulesItemServeErrorRuleCategoriesList = Array; export const RulesEditResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemServeErrorRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemServeErrorRule", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlAction = "set_cache_control"; export const RulesEditResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersImmutable = | RulesEditResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersMaxAge = | RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidate = | RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstand = | RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoCache = | RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoStore = | RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersNoTransform = | RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersPrivate = | RulesEditResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersPublic = | RulesEditResponseRulesItemSetCacheControlActionParametersPublicSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersSMaxage = | RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfError = | RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface RulesEditResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: RulesEditResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: RulesEditResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: RulesEditResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: RulesEditResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: RulesEditResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: RulesEditResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: RulesEditResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: RulesEditResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const RulesEditResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlCategoriesList = Array; export const RulesEditResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheControl", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const RulesEditResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( RulesEditResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheSettingsRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const RulesEditResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsActionParameters = | RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | RulesEditResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | RulesEditResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | RulesEditResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const RulesEditResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type RulesEditResponseRulesItemSetCacheTagsCategoriesList = Array; export const RulesEditResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetCacheTags", }) as any as S.Schema; export type RulesEditResponseRulesItemSetConfigRuleAction = "set_config"; export const RulesEditResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const RulesEditResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type RulesEditResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const RulesEditResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const RulesEditResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const RulesEditResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const RulesEditResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const RulesEditResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface RulesEditResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: RulesEditResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: RulesEditResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: RulesEditResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: RulesEditResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: RulesEditResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const RulesEditResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr(RulesEditResponseRulesItemSetConfigRuleActionParametersPolish), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( RulesEditResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( RulesEditResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( RulesEditResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(RulesEditResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemSetConfigRuleCategoriesList = Array; export const RulesEditResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemSetConfigRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSetConfigRule", }) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleAction = "skip"; export const RulesEditResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSkipRuleActionParametersPhase = "current"; export const RulesEditResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const RulesEditResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const RulesEditResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( RulesEditResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const RulesEditResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSkipRuleActionParametersProductsList = Array; export const RulesEditResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( RulesEditResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const RulesEditResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | RulesEditResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const RulesEditResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, RulesEditResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const RulesEditResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const RulesEditResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: RulesEditResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: RulesEditResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: RulesEditResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: RulesEditResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: RulesEditResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: RulesEditResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const RulesEditResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleActionParametersPhasesList), ), products: S.optional( S.NullOr( RulesEditResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr( RulesEditResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleCategoriesList = Array; export const RulesEditResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesEditResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(RulesEditResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemSkipRule", }) as any as S.Schema; export type RulesEditResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const RulesEditResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type RulesEditResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const RulesEditResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type RulesEditResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const RulesEditResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RulesEditResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const RulesEditResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type RulesEditResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const RulesEditResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: RulesEditResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const RulesEditResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: RulesEditResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "RulesEditResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface RulesEditResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: RulesEditResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: RulesEditResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: RulesEditResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const RulesEditResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(RulesEditResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(RulesEditResponseRulesItemTransformResponseHTMLCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(RulesEditResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RulesEditResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type RulesEditResponseRulesItem = | RulesEditResponseRulesItemBlockRule | RulesEditResponseRulesItemChallenge | RulesEditResponseRulesItemCompressResponseRule | RulesEditResponseRulesItemDDoSDynamicRule | RulesEditResponseRulesItemExecuteRule | RulesEditResponseRulesItemForceConnectionCloseRule | RulesEditResponseRulesItemJSChallenge | RulesEditResponseRulesItemLogRule | RulesEditResponseRulesItemLogCustomFieldRule | RulesEditResponseRulesItemManagedChallengeRule | RulesEditResponseRulesItemRedirectRule | RulesEditResponseRulesItemRewriteRule | RulesEditResponseRulesItemRouteRule | RulesEditResponseRulesItemScoreRule | RulesEditResponseRulesItemServeErrorRule | RulesEditResponseRulesItemSetCacheControl | RulesEditResponseRulesItemSetCacheSettingsRule | RulesEditResponseRulesItemSetCacheTags | RulesEditResponseRulesItemSetConfigRule | RulesEditResponseRulesItemSkipRule | RulesEditResponseRulesItemTransformResponseHTML; export const RulesEditResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type RulesEditResponseRulesList = Array; export const RulesEditResponseRulesList = /*@__PURE__*/ S.Array( RulesEditResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchRuleResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: RulesEditResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: RulesEditResponsePhase; /** The list of rules in the ruleset. */ rules: RulesEditResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const PatchRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: RulesEditResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: RulesEditResponsePhase, rules: RulesEditResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRuleResponse", }) as any as S.Schema; export interface PatchRuleForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** The unique ID of the rule. */ ruleId: string; body: RulesEditRequestBody; } export const PatchRuleForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), ruleId: S.String.pipe(T.Label("rule_id")), body: RulesEditRequestBody.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/rulesets/{ruleset_id}/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRuleForZoneRequest", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemBlockRuleAction = "block"; export const PhasesUpdateRequestRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const PhasesUpdateRequestRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type PhasesUpdateRequestRulesItemBlockRuleActionParameters = CreateRequestRulesItemBlockRuleActionParameters; export const PhasesUpdateRequestRulesItemBlockRuleActionParameters = CreateRequestRulesItemBlockRuleActionParameters; export type PhasesUpdateRequestRulesItemBlockRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const PhasesUpdateRequestRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type PhasesUpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemBlockRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemBlockRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemBlockRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemBlockRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemBlockRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemBlockRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemBlockRuleAction), actionParameters: S.optional( CreateRequestRulesItemBlockRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemBlockRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemBlockRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemBlockRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemChallengeAction = "challenge"; export const PhasesUpdateRequestRulesItemChallengeAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemChallengeCategoriesList = Array; export const PhasesUpdateRequestRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemChallengeRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemChallengeRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemChallenge { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemChallengeAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemChallengeCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemChallengeRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemChallengeAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( PhasesUpdateRequestRulesItemChallengeCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemChallengeRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemChallenge", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemCompressResponseRuleAction = "compress_response"; export const PhasesUpdateRequestRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: | PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | (string & {}); } export const PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const PhasesUpdateRequestRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: PhasesUpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemCompressResponseRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemCompressResponseRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: | PhasesUpdateRequestRulesItemCompressResponseRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemCompressResponseRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemCompressResponseRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemCompressResponseRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional( PhasesUpdateRequestRulesItemCompressResponseRuleAction, ), actionParameters: S.optional( PhasesUpdateRequestRulesItemCompressResponseRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemCompressResponseRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemCompressResponseRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemCompressResponseRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const PhasesUpdateRequestRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemDDoSDynamicRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemDDoSDynamicRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemDDoSDynamicRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemDDoSDynamicRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemDDoSDynamicRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( PhasesUpdateRequestRulesItemDDoSDynamicRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemDDoSDynamicRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemDDoSDynamicRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleAction = "execute"; export const PhasesUpdateRequestRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string; /** Whether to enable execution of rules in the category. */ enabled?: boolean; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: | PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | (string & {}); } export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.String), enabled: S.optional(S.Boolean), sensitivityLevel: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string; /** Whether to enable execution of the rule. */ enabled?: boolean; /** The score threshold to use for the rule. */ scoreThreshold?: number; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: | PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | (string & {}); } export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.String), enabled: S.optional(S.Boolean), scoreThreshold: S.optional(S.Number.pipe(T.Body("score_threshold"))), sensitivityLevel: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: | PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | (string & {}); } export const PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.String), categories: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), enabled: S.optional(S.Boolean), rules: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList, ), sensitivityLevel: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; /** A set of overrides to apply to the target ruleset. */ overrides?: PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverrides; } export const PhasesUpdateRequestRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData.pipe( T.Body("matched_data"), ), ), overrides: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParametersOverrides, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemExecuteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemExecuteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemExecuteRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemExecuteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemExecuteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemExecuteRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemExecuteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemExecuteRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemExecuteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemExecuteRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const PhasesUpdateRequestRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemForceConnectionCloseRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemForceConnectionCloseRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: | PhasesUpdateRequestRulesItemForceConnectionCloseRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemForceConnectionCloseRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional( PhasesUpdateRequestRulesItemForceConnectionCloseRuleAction, ), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( PhasesUpdateRequestRulesItemForceConnectionCloseRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemForceConnectionCloseRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemJSChallengeAction = "js_challenge"; export const PhasesUpdateRequestRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemJSChallengeCategoriesList = Array; export const PhasesUpdateRequestRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemJSChallenge { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemJSChallengeAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemJSChallengeCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemJSChallengeRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemJSChallengeAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( PhasesUpdateRequestRulesItemJSChallengeCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemJSChallengeRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemJSChallenge", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogRuleAction = "log"; export const PhasesUpdateRequestRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemLogRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemLogRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemLogRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemLogRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemLogRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemLogRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemLogRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(PhasesUpdateRequestRulesItemLogRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemLogRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemLogRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList; /** The raw response fields to log. */ rawResponseFields?: PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList; /** The raw request fields to log. */ requestFields?: PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList; /** The transformed response fields to log. */ responseFields?: PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList; /** The transformed request fields to log. */ transformedRequestFields?: PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList; } export const PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList.pipe( T.Body("cookie_fields"), ), ), rawResponseFields: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList.pipe( T.Body("raw_response_fields"), ), ), requestFields: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList.pipe( T.Body("request_fields"), ), ), responseFields: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList.pipe( T.Body("response_fields"), ), ), transformedRequestFields: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList.pipe( T.Body("transformed_request_fields"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemLogCustomFieldRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemLogCustomFieldRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemLogCustomFieldRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemLogCustomFieldRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemLogCustomFieldRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemLogCustomFieldRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemManagedChallengeRuleAction = "managed_challenge"; export const PhasesUpdateRequestRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemManagedChallengeRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemManagedChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: | PhasesUpdateRequestRulesItemManagedChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemManagedChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional( PhasesUpdateRequestRulesItemManagedChallengeRuleAction, ), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( PhasesUpdateRequestRulesItemManagedChallengeRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemManagedChallengeRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemManagedChallengeRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRedirectRuleAction = "redirect"; export const PhasesUpdateRequestRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl = CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl = CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean; /** The status code to use for the redirect. */ statusCode?: | PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode | (number & {}); } export const PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.Boolean.pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode.pipe( T.Body("status_code"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; /** A redirect based on the request properties. */ fromValue?: PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValue; } export const PhasesUpdateRequestRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList.pipe( T.Body("from_list"), ), ), fromValue: S.optional( PhasesUpdateRequestRulesItemRedirectRuleActionParametersFromValue.pipe( T.Body("from_value"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRedirectRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRedirectRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemRedirectRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemRedirectRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemRedirectRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemRedirectRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemRedirectRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemRedirectRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemRedirectRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemRedirectRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemRedirectRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRedirectRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleAction = "rewrite"; export const PhasesUpdateRequestRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeaders = | PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIPathPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIPathPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPath; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPath; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersUriURIQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export type PhasesUpdateRequestRulesItemRewriteRuleActionParametersUri = | CreateRequestRulesItemRewriteRuleActionParametersUriURIPath | CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesUpdateRequestRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface PhasesUpdateRequestRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeaders; /** A URI path rewrite. */ uri?: PhasesUpdateRequestRulesItemRewriteRuleActionParametersUri; } export const PhasesUpdateRequestRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( PhasesUpdateRequestRulesItemRewriteRuleActionParametersHeaders, ), uri: S.optional( PhasesUpdateRequestRulesItemRewriteRuleActionParametersUri, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRewriteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemRewriteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemRewriteRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemRewriteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemRewriteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemRewriteRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemRewriteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemRewriteRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemRewriteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRewriteRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemRouteRuleAction = "route"; export const PhasesUpdateRequestRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemRouteRuleActionParametersOrigin = CreateRequestRulesItemRouteRuleActionParametersOrigin; export const PhasesUpdateRequestRulesItemRouteRuleActionParametersOrigin = CreateRequestRulesItemRouteRuleActionParametersOrigin; export type PhasesUpdateRequestRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const PhasesUpdateRequestRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type PhasesUpdateRequestRulesItemRouteRuleActionParameters = CreateRequestRulesItemRouteRuleActionParameters; export const PhasesUpdateRequestRulesItemRouteRuleActionParameters = CreateRequestRulesItemRouteRuleActionParameters; export type PhasesUpdateRequestRulesItemRouteRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemRouteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemRouteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemRouteRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemRouteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemRouteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemRouteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemRouteRuleAction), actionParameters: S.optional( CreateRequestRulesItemRouteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemRouteRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemRouteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemRouteRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemScoreRuleAction = "score"; export const PhasesUpdateRequestRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const PhasesUpdateRequestRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type PhasesUpdateRequestRulesItemScoreRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemScoreRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemScoreRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemScoreRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemScoreRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemScoreRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemScoreRuleAction), actionParameters: S.optional( RulesCreateResponseRulesItemScoreRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemScoreRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemScoreRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemScoreRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemServeErrorRuleAction = "serve_error"; export const PhasesUpdateRequestRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: | PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType | (string & {}); /** The status code to use for the error. */ statusCode?: number; } export const PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType.pipe( T.Body("content_type"), ), ), statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: | PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | (string & {}); /** The status code to use for the error. */ statusCode?: number; } export const PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType.pipe( T.Body("content_type"), ), ), statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemServeErrorRuleActionParameters = | PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent | PhasesUpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset; export const PhasesUpdateRequestRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type PhasesUpdateRequestRulesItemServeErrorRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemServeErrorRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemServeErrorRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemServeErrorRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemServeErrorRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemServeErrorRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemServeErrorRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemServeErrorRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemServeErrorRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemServeErrorRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemServeErrorRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlAction = "set_cache_control"; export const PhasesUpdateRequestRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutable = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAge = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCache = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStore = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransform = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivate = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublic = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxage = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfError = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface PhasesUpdateRequestRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutable; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAge; /** A cache-control directive configuration. */ mustRevalidate?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate; /** A cache-control directive configuration. */ mustUnderstand?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCache; /** A cache-control directive configuration. */ noStore?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStore; /** A cache-control directive configuration. */ noTransform?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransform; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivate; /** A cache-control directive configuration. */ proxyRevalidate?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate; /** A cache-control directive configuration. */ public?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublic; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxage; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfError; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate; } export const PhasesUpdateRequestRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersImmutable, ), maxAge: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersMaxAge.pipe( T.Body("max-age"), ), ), mustRevalidate: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate.pipe( T.Body("must-revalidate"), ), ), mustUnderstand: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand.pipe( T.Body("must-understand"), ), ), noCache: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoCache.pipe( T.Body("no-cache"), ), ), noStore: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoStore.pipe( T.Body("no-store"), ), ), noTransform: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersNoTransform.pipe( T.Body("no-transform"), ), ), private: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersPrivate, ), proxyRevalidate: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate.pipe( T.Body("proxy-revalidate"), ), ), public: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersPublic, ), sMaxage: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersSMaxage.pipe( T.Body("s-maxage"), ), ), staleIfError: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleIfError.pipe( T.Body("stale-if-error"), ), ), staleWhileRevalidate: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate.pipe( T.Body("stale-while-revalidate"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlCategoriesList = Array; export const PhasesUpdateRequestRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheControl { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemSetCacheControlAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemSetCacheControlActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemSetCacheControlCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemSetCacheControlRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemSetCacheControlAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemSetCacheControlActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemSetCacheControlCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemSetCacheControlRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheControl", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode | (string & {}); /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.Number), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList; /** A list of cookies to include in the cache key. */ include?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList.pipe( T.Body("check_presence"), ), ), include: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean; /** A list of headers to include in the cache key. */ include?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList.pipe( T.Body("check_presence"), ), ), contains: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), excludeOrigin: S.optional(S.Boolean.pipe(T.Body("exclude_origin"))), include: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean; /** A list of query string parameters to exclude from the cache key. */ list?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.Boolean), list: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean; /** A list of query string parameters to include in the cache key. */ list?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.Boolean), list: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude; /** Which query string parameters to include in the cache key. */ include?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), include: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie; /** Which headers to include in the cache key. */ header?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader; /** How to use the host in the cache key. */ host?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString; /** How to use characteristics of the request user agent in the cache key. */ user?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), header: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), host: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), queryString: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString.pipe( T.Body("query_string"), ), ), user: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean; /** Which components of the request are included or excluded from the cache key. */ customKey?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.Boolean.pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.Boolean.pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey.pipe( T.Body("custom_key"), ), ), ignoreQueryStringsOrder: S.optional( S.Boolean.pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode | (string & {}); /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.Number), statusCodeTtl: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList.pipe( T.Body("status_code_ttl"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale = CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale = CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction | (string & {}); } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction | (string & {}); /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), mediaTypes: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList.pipe( T.Body("media_types"), ), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault; /** A mapping of lowercase request header names to their vary configuration. */ headers?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), headers: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean; /** When to serve stale content from cache. */ serveStale?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList.pipe( T.Body("additional_cacheable_ports"), ), ), browserTtl: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl.pipe( T.Body("browser_ttl"), ), ), cache: S.optional(S.Boolean), cacheKey: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey.pipe( T.Body("cache_key"), ), ), cacheReserve: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve.pipe( T.Body("cache_reserve"), ), ), edgeTtl: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl.pipe( T.Body("edge_ttl"), ), ), originCacheControl: S.optional( S.Boolean.pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.Boolean.pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.Number.pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.Boolean.pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale.pipe( T.Body("serve_stale"), ), ), sharedDictionary: S.optional( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary.pipe( T.Body("shared_dictionary"), ), ), stripEtags: S.optional(S.Boolean.pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.Boolean.pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional(S.Boolean.pipe(T.Body("strip_set_cookie"))), vary: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheSettingsRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: | PhasesUpdateRequestRulesItemSetCacheSettingsRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleAction, ), actionParameters: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemSetCacheSettingsRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsAction = "set_cache_tags"; export const PhasesUpdateRequestRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation | (string & {}); } export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation | (string & {}); } export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation | (string & {}); } export const PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsActionParameters = | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues | PhasesUpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const PhasesUpdateRequestRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type PhasesUpdateRequestRulesItemSetCacheTagsCategoriesList = Array; export const PhasesUpdateRequestRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetCacheTags { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemSetCacheTagsAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemSetCacheTagsActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemSetCacheTagsCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemSetCacheTagsRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemSetCacheTags = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemSetCacheTagsAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemSetCacheTagsActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemSetCacheTagsCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemSetCacheTagsRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetCacheTags", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetConfigRuleAction = "set_config"; export const PhasesUpdateRequestRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetConfigRuleActionParametersAutominify = CreateRequestRulesItemSetConfigRuleActionParametersAutominify; export const PhasesUpdateRequestRulesItemSetConfigRuleActionParametersAutominify = CreateRequestRulesItemSetConfigRuleActionParametersAutominify; export type PhasesUpdateRequestRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const PhasesUpdateRequestRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const PhasesUpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const PhasesUpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface PhasesUpdateRequestRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean; /** Which file extensions to minify automatically. */ autominify?: CreateRequestRulesItemSetConfigRuleActionParametersAutominify; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean; /** Whether to disable Zaraz. */ disableZaraz?: boolean; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean; /** Whether to enable Mirage. */ mirage?: boolean; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean; /** The Polish level to configure. */ polish?: | PhasesUpdateRequestRulesItemSetConfigRuleActionParametersPolish | (string & {}); /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean; /** The request body buffering mode. */ requestBodyBuffering?: | PhasesUpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering | (string & {}); /** The response body buffering mode. */ responseBodyBuffering?: | PhasesUpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering | (string & {}); /** Whether to enable Rocket Loader. */ rocketLoader?: boolean; /** The Security Level to configure. */ securityLevel?: | PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel | (string & {}); /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean; /** The SSL level to configure. */ ssl?: | PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSsl | (string & {}); /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean; } export const PhasesUpdateRequestRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.Boolean.pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersAutominify, ), bic: S.optional(S.Boolean), contentConverter: S.optional(S.Boolean.pipe(T.Body("content_converter"))), disableApps: S.optional(S.Boolean.pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.Boolean.pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.Boolean.pipe(T.Body("disable_rum"))), disableZaraz: S.optional(S.Boolean.pipe(T.Body("disable_zaraz"))), emailObfuscation: S.optional(S.Boolean.pipe(T.Body("email_obfuscation"))), fonts: S.optional(S.Boolean), hotlinkProtection: S.optional( S.Boolean.pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.Boolean), opportunisticEncryption: S.optional( S.Boolean.pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleActionParametersPolish, ), redirectsForAiTraining: S.optional( S.Boolean.pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering.pipe( T.Body("request_body_buffering"), ), ), responseBodyBuffering: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering.pipe( T.Body("response_body_buffering"), ), ), rocketLoader: S.optional(S.Boolean.pipe(T.Body("rocket_loader"))), securityLevel: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel.pipe( T.Body("security_level"), ), ), serverSideExcludes: S.optional( S.Boolean.pipe(T.Body("server_side_excludes")), ), ssl: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleActionParametersSsl, ), sxg: S.optional(S.Boolean), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetConfigRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSetConfigRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemSetConfigRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemSetConfigRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemSetConfigRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemSetConfigRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemSetConfigRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemSetConfigRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemSetConfigRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSetConfigRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleAction = "skip"; export const PhasesUpdateRequestRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersPhase = "current"; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesList = Array< | PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesItem | (string & {}) >; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsList = Array< | PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsItem | (string & {}) >; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesValueList = Array; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersRuleset = "current"; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesetsList = Array; export const PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: | PhasesUpdateRequestRulesItemSkipRuleActionParametersPhase | (string & {}); /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesList; /** A list of legacy security products to skip the execution of. */ products?: PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsList; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesMap; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: | PhasesUpdateRequestRulesItemSkipRuleActionParametersRuleset | (string & {}); /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesetsList; } export const PhasesUpdateRequestRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParametersPhase, ), phases: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParametersPhasesList, ), products: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParametersProductsList, ), rules: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesMap, ), ruleset: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParametersRuleset, ), rulesets: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParametersRulesetsList, ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleCategoriesList = Array; export const PhasesUpdateRequestRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemSkipRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: PhasesUpdateRequestRulesItemSkipRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateRequestRulesItemSkipRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemSkipRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemSkipRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemSkipRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(PhasesUpdateRequestRulesItemSkipRuleAction), actionParameters: S.optional( PhasesUpdateRequestRulesItemSkipRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemSkipRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(PhasesUpdateRequestRulesItemSkipRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemSkipRule", }) as any as S.Schema; export type PhasesUpdateRequestRulesItemTransformResponseHTMLAction = "transform_response_html"; export const PhasesUpdateRequestRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type PhasesUpdateRequestRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const PhasesUpdateRequestRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type PhasesUpdateRequestRulesItemTransformResponseHTMLCategoriesList = Array; export const PhasesUpdateRequestRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateRequestRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateRequestRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface PhasesUpdateRequestRulesItemTransformResponseHTML { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: | PhasesUpdateRequestRulesItemTransformResponseHTMLAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; /** The categories of the rule. */ categories?: PhasesUpdateRequestRulesItemTransformResponseHTMLCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const PhasesUpdateRequestRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional( PhasesUpdateRequestRulesItemTransformResponseHTMLAction, ), actionParameters: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( PhasesUpdateRequestRulesItemTransformResponseHTMLCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( PhasesUpdateRequestRulesItemTransformResponseHTMLRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "PhasesUpdateRequestRulesItemTransformResponseHTML", }) as any as S.Schema; export type PhasesUpdateRequestRulesItem = | PhasesUpdateRequestRulesItemBlockRule | PhasesUpdateRequestRulesItemChallenge | PhasesUpdateRequestRulesItemCompressResponseRule | PhasesUpdateRequestRulesItemDDoSDynamicRule | PhasesUpdateRequestRulesItemExecuteRule | PhasesUpdateRequestRulesItemForceConnectionCloseRule | PhasesUpdateRequestRulesItemJSChallenge | PhasesUpdateRequestRulesItemLogRule | PhasesUpdateRequestRulesItemLogCustomFieldRule | PhasesUpdateRequestRulesItemManagedChallengeRule | PhasesUpdateRequestRulesItemRedirectRule | PhasesUpdateRequestRulesItemRewriteRule | PhasesUpdateRequestRulesItemRouteRule | PhasesUpdateRequestRulesItemScoreRule | PhasesUpdateRequestRulesItemServeErrorRule | PhasesUpdateRequestRulesItemSetCacheControl | PhasesUpdateRequestRulesItemSetCacheSettingsRule | PhasesUpdateRequestRulesItemSetCacheTags | PhasesUpdateRequestRulesItemSetConfigRule | PhasesUpdateRequestRulesItemSkipRule | PhasesUpdateRequestRulesItemTransformResponseHTML; export const PhasesUpdateRequestRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type PhasesUpdateRequestRulesList = Array; export const PhasesUpdateRequestRulesList = /*@__PURE__*/ S.Array( PhasesUpdateRequestRulesItem, ) as any as S.Schema; export interface PutPhasForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The phase of the ruleset. */ rulesetPhase: string; /** An informative description of the ruleset. */ description?: string; /** The human-readable name of the ruleset. */ name?: string; /** The list of rules in the ruleset. */ rules?: PhasesUpdateRequestRulesList; } export const PutPhasForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), description: S.optional(S.String), name: S.optional(S.String), rules: S.optional(PhasesUpdateRequestRulesList), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutPhasForAccountRequest", }) as any as S.Schema; export type PhasesUpdateResponseKind = "managed" | "custom" | "root" | "zone"; export const PhasesUpdateResponseKind = /*@__PURE__*/ S.String; export type PhasesUpdateResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesUpdateResponsePhase = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemBlockRuleAction = "block"; export const PhasesUpdateResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const PhasesUpdateResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type PhasesUpdateResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const PhasesUpdateResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type PhasesUpdateResponseRulesItemBlockRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const PhasesUpdateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type PhasesUpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemBlockRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemBlockRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemBlockRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemChallengeAction = "challenge"; export const PhasesUpdateResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemChallengeCategoriesList = Array; export const PhasesUpdateResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemChallenge", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemCompressResponseRuleAction = "compress_response"; export const PhasesUpdateResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const PhasesUpdateResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: PhasesUpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemCompressResponseRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesUpdateResponseRulesItemCompressResponseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const PhasesUpdateResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleAction = "execute"; export const PhasesUpdateResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const PhasesUpdateResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr( PhasesUpdateResponseRulesItemExecuteRuleActionParametersOverrides, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemExecuteRuleAction), ), actionParameters: S.optional( S.NullOr(PhasesUpdateResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemExecuteRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const PhasesUpdateResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesUpdateResponseRulesItemForceConnectionCloseRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr( PhasesUpdateResponseRulesItemForceConnectionCloseRuleRatelimit, ), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemJSChallengeAction = "js_challenge"; export const PhasesUpdateResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemJSChallengeCategoriesList = Array; export const PhasesUpdateResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemJSChallengeAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemJSChallenge", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogRuleAction = "log"; export const PhasesUpdateResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemLogRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemLogRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesUpdateResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemLogRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemLogRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const PhasesUpdateResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesUpdateResponseRulesItemManagedChallengeRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRedirectRuleAction = "redirect"; export const PhasesUpdateResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const PhasesUpdateResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( PhasesUpdateResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRedirectRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRedirectRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemRedirectRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRedirectRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleAction = "rewrite"; export const PhasesUpdateResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeaders = | PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type PhasesUpdateResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const PhasesUpdateResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface PhasesUpdateResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: PhasesUpdateResponseRulesItemRewriteRuleActionParametersUri | null; } export const PhasesUpdateResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr( PhasesUpdateResponseRulesItemRewriteRuleActionParametersHeaders, ), ), uri: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRewriteRuleAction), ), actionParameters: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRewriteRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemRouteRuleAction = "route"; export const PhasesUpdateResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const PhasesUpdateResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type PhasesUpdateResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const PhasesUpdateResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type PhasesUpdateResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const PhasesUpdateResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type PhasesUpdateResponseRulesItemRouteRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRouteRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemRouteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemRouteRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemScoreRuleAction = "score"; export const PhasesUpdateResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const PhasesUpdateResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type PhasesUpdateResponseRulesItemScoreRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemScoreRuleAction), ), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemScoreRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemScoreRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemServeErrorRuleAction = "serve_error"; export const PhasesUpdateResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemServeErrorRuleActionParameters = | PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent | PhasesUpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const PhasesUpdateResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type PhasesUpdateResponseRulesItemServeErrorRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemServeErrorRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemServeErrorRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemServeErrorRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlAction = "set_cache_control"; export const PhasesUpdateResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutable = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAge = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCache = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStore = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransform = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivate = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublic = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxage = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfError = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface PhasesUpdateResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const PhasesUpdateResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersPrivate, ), ), proxyRevalidate: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersPublic, ), ), sMaxage: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlCategoriesList = Array; export const PhasesUpdateResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheControlActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheControl", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheSettingsRuleCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const PhasesUpdateResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsActionParameters = | PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | PhasesUpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | PhasesUpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | PhasesUpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const PhasesUpdateResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type PhasesUpdateResponseRulesItemSetCacheTagsCategoriesList = Array; export const PhasesUpdateResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheTagsAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetCacheTagsActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetCacheTags", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetConfigRuleAction = "set_config"; export const PhasesUpdateResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const PhasesUpdateResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type PhasesUpdateResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const PhasesUpdateResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const PhasesUpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const PhasesUpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface PhasesUpdateResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: PhasesUpdateResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: PhasesUpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: PhasesUpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const PhasesUpdateResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetConfigRuleActionParametersPolish, ), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetConfigRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetConfigRuleAction), ), actionParameters: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSetConfigRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSetConfigRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleAction = "skip"; export const PhasesUpdateResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersPhase = "current"; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsList = Array; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: PhasesUpdateResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: PhasesUpdateResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const PhasesUpdateResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSkipRuleActionParametersPhasesList, ), ), products: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSkipRuleActionParametersProductsList, ), ), rules: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr( PhasesUpdateResponseRulesItemSkipRuleActionParametersRulesetsList, ), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleCategoriesList = Array; export const PhasesUpdateResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: PhasesUpdateResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(PhasesUpdateResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemSkipRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemSkipRule", }) as any as S.Schema; export type PhasesUpdateResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const PhasesUpdateResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type PhasesUpdateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const PhasesUpdateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type PhasesUpdateResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const PhasesUpdateResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type PhasesUpdateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const PhasesUpdateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface PhasesUpdateResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: PhasesUpdateResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: PhasesUpdateResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const PhasesUpdateResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(PhasesUpdateResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr( PhasesUpdateResponseRulesItemTransformResponseHTMLCategoriesList, ), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(PhasesUpdateResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhasesUpdateResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type PhasesUpdateResponseRulesItem = | PhasesUpdateResponseRulesItemBlockRule | PhasesUpdateResponseRulesItemChallenge | PhasesUpdateResponseRulesItemCompressResponseRule | PhasesUpdateResponseRulesItemDDoSDynamicRule | PhasesUpdateResponseRulesItemExecuteRule | PhasesUpdateResponseRulesItemForceConnectionCloseRule | PhasesUpdateResponseRulesItemJSChallenge | PhasesUpdateResponseRulesItemLogRule | PhasesUpdateResponseRulesItemLogCustomFieldRule | PhasesUpdateResponseRulesItemManagedChallengeRule | PhasesUpdateResponseRulesItemRedirectRule | PhasesUpdateResponseRulesItemRewriteRule | PhasesUpdateResponseRulesItemRouteRule | PhasesUpdateResponseRulesItemScoreRule | PhasesUpdateResponseRulesItemServeErrorRule | PhasesUpdateResponseRulesItemSetCacheControl | PhasesUpdateResponseRulesItemSetCacheSettingsRule | PhasesUpdateResponseRulesItemSetCacheTags | PhasesUpdateResponseRulesItemSetConfigRule | PhasesUpdateResponseRulesItemSkipRule | PhasesUpdateResponseRulesItemTransformResponseHTML; export const PhasesUpdateResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type PhasesUpdateResponseRulesList = Array; export const PhasesUpdateResponseRulesList = /*@__PURE__*/ S.Array( PhasesUpdateResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutPhasResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: PhasesUpdateResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: PhasesUpdateResponsePhase; /** The list of rules in the ruleset. */ rules: PhasesUpdateResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const PutPhasResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: PhasesUpdateResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: PhasesUpdateResponsePhase, rules: PhasesUpdateResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutPhasResponse", }) as any as S.Schema; export interface PutPhasForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The phase of the ruleset. */ rulesetPhase: string; /** An informative description of the ruleset. */ description?: string; /** The human-readable name of the ruleset. */ name?: string; /** The list of rules in the ruleset. */ rules?: PhasesUpdateRequestRulesList; } export const PutPhasForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetPhase: S.String.pipe(T.Label("ruleset_phase")), description: S.optional(S.String), name: S.optional(S.String), rules: S.optional(PhasesUpdateRequestRulesList), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutPhasForZoneRequest", }) as any as S.Schema; export type UpdateRequestKind = "managed" | "custom" | "root" | "zone"; export const UpdateRequestKind = /*@__PURE__*/ S.String; export type UpdateRequestPhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const UpdateRequestPhase = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemBlockRuleAction = "block"; export const UpdateRequestRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const UpdateRequestRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type UpdateRequestRulesItemBlockRuleActionParameters = CreateRequestRulesItemBlockRuleActionParameters; export const UpdateRequestRulesItemBlockRuleActionParameters = CreateRequestRulesItemBlockRuleActionParameters; export type UpdateRequestRulesItemBlockRuleCategoriesList = Array; export const UpdateRequestRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const UpdateRequestRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type UpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateRequestRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemBlockRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemBlockRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemBlockRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemBlockRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemBlockRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemBlockRuleAction), actionParameters: S.optional( CreateRequestRulesItemBlockRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemBlockRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemBlockRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemBlockRule", }) as any as S.Schema; export type UpdateRequestRulesItemChallengeAction = "challenge"; export const UpdateRequestRulesItemChallengeAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemChallengeCategoriesList = Array; export const UpdateRequestRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemChallengeRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateRequestRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemChallengeRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemChallenge { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemChallengeAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: UpdateRequestRulesItemChallengeCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemChallengeRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemChallengeAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(UpdateRequestRulesItemChallengeCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemChallengeRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemChallenge", }) as any as S.Schema; export type UpdateRequestRulesItemCompressResponseRuleAction = "compress_response"; export const UpdateRequestRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: | UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | (string & {}); } export const UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), }), ).annotate({ identifier: "UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface UpdateRequestRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const UpdateRequestRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: UpdateRequestRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "UpdateRequestRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemCompressResponseRuleCategoriesList = Array; export const UpdateRequestRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemCompressResponseRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemCompressResponseRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemCompressResponseRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemCompressResponseRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemCompressResponseRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemCompressResponseRuleAction), actionParameters: S.optional( UpdateRequestRulesItemCompressResponseRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( UpdateRequestRulesItemCompressResponseRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( UpdateRequestRulesItemCompressResponseRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemCompressResponseRule", }) as any as S.Schema; export type UpdateRequestRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const UpdateRequestRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemDDoSDynamicRuleCategoriesList = Array; export const UpdateRequestRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemDDoSDynamicRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemDDoSDynamicRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: UpdateRequestRulesItemDDoSDynamicRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemDDoSDynamicRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemDDoSDynamicRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( UpdateRequestRulesItemDDoSDynamicRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemDDoSDynamicRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemDDoSDynamicRule", }) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleAction = "execute"; export const UpdateRequestRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const UpdateRequestRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string; /** Whether to enable execution of rules in the category. */ enabled?: boolean; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: | UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | (string & {}); } export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.String), enabled: S.optional(S.Boolean), sensitivityLevel: S.optional( UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string; /** Whether to enable execution of the rule. */ enabled?: boolean; /** The score threshold to use for the rule. */ scoreThreshold?: number; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: | UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | (string & {}); } export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.String), enabled: S.optional(S.Boolean), scoreThreshold: S.optional(S.Number.pipe(T.Body("score_threshold"))), sensitivityLevel: S.optional( UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const UpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: | UpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | (string & {}); } export const UpdateRequestRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.String), categories: S.optional( UpdateRequestRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), enabled: S.optional(S.Boolean), rules: S.optional( UpdateRequestRulesItemExecuteRuleActionParametersOverridesRulesList, ), sensitivityLevel: S.optional( UpdateRequestRulesItemExecuteRuleActionParametersOverridesSensitivityLevel.pipe( T.Body("sensitivity_level"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface UpdateRequestRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; /** A set of overrides to apply to the target ruleset. */ overrides?: UpdateRequestRulesItemExecuteRuleActionParametersOverrides; } export const UpdateRequestRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData.pipe( T.Body("matched_data"), ), ), overrides: S.optional( UpdateRequestRulesItemExecuteRuleActionParametersOverrides, ), }), ).annotate({ identifier: "UpdateRequestRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleCategoriesList = Array; export const UpdateRequestRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemExecuteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemExecuteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemExecuteRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemExecuteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemExecuteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemExecuteRuleAction), actionParameters: S.optional( UpdateRequestRulesItemExecuteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemExecuteRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemExecuteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemExecuteRule", }) as any as S.Schema; export type UpdateRequestRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const UpdateRequestRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemForceConnectionCloseRuleCategoriesList = Array; export const UpdateRequestRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemForceConnectionCloseRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemForceConnectionCloseRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: UpdateRequestRulesItemForceConnectionCloseRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemForceConnectionCloseRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemForceConnectionCloseRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( UpdateRequestRulesItemForceConnectionCloseRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( UpdateRequestRulesItemForceConnectionCloseRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type UpdateRequestRulesItemJSChallengeAction = "js_challenge"; export const UpdateRequestRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemJSChallengeCategoriesList = Array; export const UpdateRequestRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemJSChallenge { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemJSChallengeAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: UpdateRequestRulesItemJSChallengeCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemJSChallengeRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemJSChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemJSChallengeAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(UpdateRequestRulesItemJSChallengeCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemJSChallengeRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemJSChallenge", }) as any as S.Schema; export type UpdateRequestRulesItemLogRuleAction = "log"; export const UpdateRequestRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemLogRuleCategoriesList = Array; export const UpdateRequestRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemLogRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateRequestRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemLogRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemLogRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: UpdateRequestRulesItemLogRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemLogRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemLogRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional(UpdateRequestRulesItemLogRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemLogRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemLogRule", }) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const UpdateRequestRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( CreateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type UpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface UpdateRequestRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: UpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList; /** The raw response fields to log. */ rawResponseFields?: UpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList; /** The raw request fields to log. */ requestFields?: UpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList; /** The transformed response fields to log. */ responseFields?: UpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList; /** The transformed request fields to log. */ transformedRequestFields?: UpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList; } export const UpdateRequestRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( UpdateRequestRulesItemLogCustomFieldRuleActionParametersCookieFieldsList.pipe( T.Body("cookie_fields"), ), ), rawResponseFields: S.optional( UpdateRequestRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList.pipe( T.Body("raw_response_fields"), ), ), requestFields: S.optional( UpdateRequestRulesItemLogCustomFieldRuleActionParametersRequestFieldsList.pipe( T.Body("request_fields"), ), ), responseFields: S.optional( UpdateRequestRulesItemLogCustomFieldRuleActionParametersResponseFieldsList.pipe( T.Body("response_fields"), ), ), transformedRequestFields: S.optional( UpdateRequestRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList.pipe( T.Body("transformed_request_fields"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleCategoriesList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemLogCustomFieldRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemLogCustomFieldRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemLogCustomFieldRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemLogCustomFieldRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemLogCustomFieldRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemLogCustomFieldRuleAction), actionParameters: S.optional( UpdateRequestRulesItemLogCustomFieldRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( UpdateRequestRulesItemLogCustomFieldRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemLogCustomFieldRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemLogCustomFieldRule", }) as any as S.Schema; export type UpdateRequestRulesItemManagedChallengeRuleAction = "managed_challenge"; export const UpdateRequestRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemManagedChallengeRuleCategoriesList = Array; export const UpdateRequestRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemManagedChallengeRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemManagedChallengeRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: unknown; /** The categories of the rule. */ categories?: UpdateRequestRulesItemManagedChallengeRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemManagedChallengeRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemManagedChallengeRuleAction), actionParameters: S.optional(S.Unknown.pipe(T.Body("action_parameters"))), categories: S.optional( UpdateRequestRulesItemManagedChallengeRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( UpdateRequestRulesItemManagedChallengeRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemManagedChallengeRule", }) as any as S.Schema; export type UpdateRequestRulesItemRedirectRuleAction = "redirect"; export const UpdateRequestRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const UpdateRequestRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type UpdateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl = CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const UpdateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl = CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type UpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const UpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface UpdateRequestRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean; /** The status code to use for the redirect. */ statusCode?: | UpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode | (number & {}); } export const UpdateRequestRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: CreateRequestRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.Boolean.pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( UpdateRequestRulesItemRedirectRuleActionParametersFromValueStatusCode.pipe( T.Body("status_code"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface UpdateRequestRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; /** A redirect based on the request properties. */ fromValue?: UpdateRequestRulesItemRedirectRuleActionParametersFromValue; } export const UpdateRequestRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList.pipe( T.Body("from_list"), ), ), fromValue: S.optional( UpdateRequestRulesItemRedirectRuleActionParametersFromValue.pipe( T.Body("from_value"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemRedirectRuleCategoriesList = Array; export const UpdateRequestRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemRedirectRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemRedirectRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemRedirectRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemRedirectRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemRedirectRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemRedirectRuleAction), actionParameters: S.optional( UpdateRequestRulesItemRedirectRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemRedirectRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemRedirectRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemRedirectRule", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleAction = "rewrite"; export const UpdateRequestRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleActionParametersHeaders = | UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | UpdateRequestRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | UpdateRequestRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | UpdateRequestRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const UpdateRequestRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type UpdateRequestRulesItemRewriteRuleActionParametersUriURIPathPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath; export const UpdateRequestRulesItemRewriteRuleActionParametersUriURIPathPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPathPath; export type UpdateRequestRulesItemRewriteRuleActionParametersUriURIPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPath; export const UpdateRequestRulesItemRewriteRuleActionParametersUriURIPath = CreateRequestRulesItemRewriteRuleActionParametersUriURIPath; export type UpdateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const UpdateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type UpdateRequestRulesItemRewriteRuleActionParametersUriURIQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export const UpdateRequestRulesItemRewriteRuleActionParametersUriURIQuery = CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export type UpdateRequestRulesItemRewriteRuleActionParametersUri = | CreateRequestRulesItemRewriteRuleActionParametersUriURIPath | CreateRequestRulesItemRewriteRuleActionParametersUriURIQuery; export const UpdateRequestRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface UpdateRequestRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: UpdateRequestRulesItemRewriteRuleActionParametersHeaders; /** A URI path rewrite. */ uri?: UpdateRequestRulesItemRewriteRuleActionParametersUri; } export const UpdateRequestRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( UpdateRequestRulesItemRewriteRuleActionParametersHeaders, ), uri: S.optional(UpdateRequestRulesItemRewriteRuleActionParametersUri), }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleCategoriesList = Array; export const UpdateRequestRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemRewriteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemRewriteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemRewriteRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemRewriteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemRewriteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemRewriteRuleAction), actionParameters: S.optional( UpdateRequestRulesItemRewriteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemRewriteRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemRewriteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemRewriteRule", }) as any as S.Schema; export type UpdateRequestRulesItemRouteRuleAction = "route"; export const UpdateRequestRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemRouteRuleActionParametersOrigin = CreateRequestRulesItemRouteRuleActionParametersOrigin; export const UpdateRequestRulesItemRouteRuleActionParametersOrigin = CreateRequestRulesItemRouteRuleActionParametersOrigin; export type UpdateRequestRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const UpdateRequestRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type UpdateRequestRulesItemRouteRuleActionParameters = CreateRequestRulesItemRouteRuleActionParameters; export const UpdateRequestRulesItemRouteRuleActionParameters = CreateRequestRulesItemRouteRuleActionParameters; export type UpdateRequestRulesItemRouteRuleCategoriesList = Array; export const UpdateRequestRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateRequestRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemRouteRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemRouteRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: CreateRequestRulesItemRouteRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemRouteRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemRouteRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemRouteRuleAction), actionParameters: S.optional( CreateRequestRulesItemRouteRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemRouteRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemRouteRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemRouteRule", }) as any as S.Schema; export type UpdateRequestRulesItemScoreRuleAction = "score"; export const UpdateRequestRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const UpdateRequestRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type UpdateRequestRulesItemScoreRuleCategoriesList = Array; export const UpdateRequestRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateRequestRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemScoreRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemScoreRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemScoreRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemScoreRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemScoreRuleAction), actionParameters: S.optional( RulesCreateResponseRulesItemScoreRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemScoreRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemScoreRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemScoreRule", }) as any as S.Schema; export type UpdateRequestRulesItemServeErrorRuleAction = "serve_error"; export const UpdateRequestRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: | UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType | (string & {}); /** The status code to use for the error. */ statusCode?: number; } export const UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContentContentType.pipe( T.Body("content_type"), ), ), statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), }), ).annotate({ identifier: "UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: | UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | (string & {}); /** The status code to use for the error. */ statusCode?: number; } export const UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAssetContentType.pipe( T.Body("content_type"), ), ), statusCode: S.optional(S.Number.pipe(T.Body("status_code"))), }), ).annotate({ identifier: "UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type UpdateRequestRulesItemServeErrorRuleActionParameters = | UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersContent | UpdateRequestRulesItemServeErrorRuleActionParametersActionParametersAsset; export const UpdateRequestRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type UpdateRequestRulesItemServeErrorRuleCategoriesList = Array; export const UpdateRequestRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemServeErrorRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemServeErrorRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemServeErrorRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemServeErrorRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemServeErrorRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemServeErrorRuleAction), actionParameters: S.optional( UpdateRequestRulesItemServeErrorRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( UpdateRequestRulesItemServeErrorRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemServeErrorRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemServeErrorRule", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlAction = "set_cache_control"; export const UpdateRequestRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersImmutable = | UpdateRequestRulesItemSetCacheControlActionParametersImmutableSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersMaxAge = | UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate = | UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand = | UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList; } export const UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersNoCache = | UpdateRequestRulesItemSetCacheControlActionParametersNoCacheSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersNoStore = | UpdateRequestRulesItemSetCacheControlActionParametersNoStoreSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersNoTransform = | UpdateRequestRulesItemSetCacheControlActionParametersNoTransformSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList; } export const UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), qualifiers: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersPrivate = | UpdateRequestRulesItemSetCacheControlActionParametersPrivateSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate = | UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersPublic = | UpdateRequestRulesItemSetCacheControlActionParametersPublicSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersSMaxage = | UpdateRequestRulesItemSetCacheControlActionParametersSMaxageSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersStaleIfError = | UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation | (string & {}); /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: | UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation | (string & {}); /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean; } export const UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional(S.Boolean.pipe(T.Body("cloudflare_only"))), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface UpdateRequestRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: UpdateRequestRulesItemSetCacheControlActionParametersImmutable; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: UpdateRequestRulesItemSetCacheControlActionParametersMaxAge; /** A cache-control directive configuration. */ mustRevalidate?: UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate; /** A cache-control directive configuration. */ mustUnderstand?: UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: UpdateRequestRulesItemSetCacheControlActionParametersNoCache; /** A cache-control directive configuration. */ noStore?: UpdateRequestRulesItemSetCacheControlActionParametersNoStore; /** A cache-control directive configuration. */ noTransform?: UpdateRequestRulesItemSetCacheControlActionParametersNoTransform; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: UpdateRequestRulesItemSetCacheControlActionParametersPrivate; /** A cache-control directive configuration. */ proxyRevalidate?: UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate; /** A cache-control directive configuration. */ public?: UpdateRequestRulesItemSetCacheControlActionParametersPublic; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: UpdateRequestRulesItemSetCacheControlActionParametersSMaxage; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: UpdateRequestRulesItemSetCacheControlActionParametersStaleIfError; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate; } export const UpdateRequestRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersImmutable, ), maxAge: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersMaxAge.pipe( T.Body("max-age"), ), ), mustRevalidate: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersMustRevalidate.pipe( T.Body("must-revalidate"), ), ), mustUnderstand: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersMustUnderstand.pipe( T.Body("must-understand"), ), ), noCache: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersNoCache.pipe( T.Body("no-cache"), ), ), noStore: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersNoStore.pipe( T.Body("no-store"), ), ), noTransform: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersNoTransform.pipe( T.Body("no-transform"), ), ), private: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersPrivate, ), proxyRevalidate: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersProxyRevalidate.pipe( T.Body("proxy-revalidate"), ), ), public: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersPublic, ), sMaxage: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersSMaxage.pipe( T.Body("s-maxage"), ), ), staleIfError: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersStaleIfError.pipe( T.Body("stale-if-error"), ), ), staleWhileRevalidate: S.optional( UpdateRequestRulesItemSetCacheControlActionParametersStaleWhileRevalidate.pipe( T.Body("stale-while-revalidate"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlCategoriesList = Array; export const UpdateRequestRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheControl { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemSetCacheControlAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemSetCacheControlActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemSetCacheControlCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemSetCacheControlRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemSetCacheControl = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemSetCacheControlAction), actionParameters: S.optional( UpdateRequestRulesItemSetCacheControlActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( UpdateRequestRulesItemSetCacheControlCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemSetCacheControlRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheControl", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const UpdateRequestRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: | UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode | (string & {}); /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.Number), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList; /** A list of cookies to include in the cache key. */ include?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList.pipe( T.Body("check_presence"), ), ), include: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean; /** A list of headers to include in the cache key. */ include?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList.pipe( T.Body("check_presence"), ), ), contains: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), excludeOrigin: S.optional(S.Boolean.pipe(T.Body("exclude_origin"))), include: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean; /** A list of query string parameters to exclude from the cache key. */ list?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.Boolean), list: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean; /** A list of query string parameters to include in the cache key. */ list?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.Boolean), list: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude; /** Which query string parameters to include in the cache key. */ include?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), include: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie; /** Which headers to include in the cache key. */ header?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader; /** How to use the host in the cache key. */ host?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString; /** How to use characteristics of the request user agent in the cache key. */ user?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), header: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), host: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), queryString: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString.pipe( T.Body("query_string"), ), ), user: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean; /** Which components of the request are included or excluded from the cache key. */ customKey?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.Boolean.pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.Boolean.pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey.pipe( T.Body("custom_key"), ), ), ignoreQueryStringsOrder: S.optional( S.Boolean.pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve = CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( CreateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: | UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode | (string & {}); /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.Number), statusCodeTtl: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList.pipe( T.Body("status_code_ttl"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale = CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale = CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: | UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction | (string & {}); } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: | UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction | (string & {}); /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), mediaTypes: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList.pipe( T.Body("media_types"), ), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault; /** A mapping of lowercase request header names to their vary configuration. */ headers?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), headers: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean; /** When to serve stale content from cache. */ serveStale?: CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary; } export const UpdateRequestRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList.pipe( T.Body("additional_cacheable_ports"), ), ), browserTtl: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersBrowserTtl.pipe( T.Body("browser_ttl"), ), ), cache: S.optional(S.Boolean), cacheKey: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersCacheKey.pipe( T.Body("cache_key"), ), ), cacheReserve: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersCacheReserve.pipe( T.Body("cache_reserve"), ), ), edgeTtl: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersEdgeTtl.pipe( T.Body("edge_ttl"), ), ), originCacheControl: S.optional( S.Boolean.pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.Boolean.pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.Number.pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.Boolean.pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( CreateRequestRulesItemSetCacheSettingsRuleActionParametersServeStale.pipe( T.Body("serve_stale"), ), ), sharedDictionary: S.optional( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary.pipe( T.Body("shared_dictionary"), ), ), stripEtags: S.optional(S.Boolean.pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.Boolean.pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional(S.Boolean.pipe(T.Body("strip_set_cookie"))), vary: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParametersVary, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleCategoriesList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheSettingsRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemSetCacheSettingsRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemSetCacheSettingsRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemSetCacheSettingsRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemSetCacheSettingsRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemSetCacheSettingsRuleAction), actionParameters: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( UpdateRequestRulesItemSetCacheSettingsRuleRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsAction = "set_cache_tags"; export const UpdateRequestRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation | (string & {}); } export const UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation | (string & {}); } export const UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: | UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation | (string & {}); /** A list of cache tag values. */ values: UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: | UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation | (string & {}); } export const UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsActionParameters = | UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsValues | UpdateRequestRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | UpdateRequestRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsValues | UpdateRequestRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const UpdateRequestRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type UpdateRequestRulesItemSetCacheTagsCategoriesList = Array; export const UpdateRequestRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemSetCacheTags { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemSetCacheTagsAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemSetCacheTagsActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemSetCacheTagsCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemSetCacheTagsRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemSetCacheTagsAction), actionParameters: S.optional( UpdateRequestRulesItemSetCacheTagsActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemSetCacheTagsCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemSetCacheTagsRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemSetCacheTags", }) as any as S.Schema; export type UpdateRequestRulesItemSetConfigRuleAction = "set_config"; export const UpdateRequestRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetConfigRuleActionParametersAutominify = CreateRequestRulesItemSetConfigRuleActionParametersAutominify; export const UpdateRequestRulesItemSetConfigRuleActionParametersAutominify = CreateRequestRulesItemSetConfigRuleActionParametersAutominify; export type UpdateRequestRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const UpdateRequestRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const UpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const UpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const UpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const UpdateRequestRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface UpdateRequestRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean; /** Which file extensions to minify automatically. */ autominify?: CreateRequestRulesItemSetConfigRuleActionParametersAutominify; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean; /** Whether to disable Zaraz. */ disableZaraz?: boolean; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean; /** Whether to enable Mirage. */ mirage?: boolean; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean; /** The Polish level to configure. */ polish?: | UpdateRequestRulesItemSetConfigRuleActionParametersPolish | (string & {}); /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean; /** The request body buffering mode. */ requestBodyBuffering?: | UpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering | (string & {}); /** The response body buffering mode. */ responseBodyBuffering?: | UpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering | (string & {}); /** Whether to enable Rocket Loader. */ rocketLoader?: boolean; /** The Security Level to configure. */ securityLevel?: | UpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel | (string & {}); /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean; /** The SSL level to configure. */ ssl?: UpdateRequestRulesItemSetConfigRuleActionParametersSsl | (string & {}); /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean; } export const UpdateRequestRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.Boolean.pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( CreateRequestRulesItemSetConfigRuleActionParametersAutominify, ), bic: S.optional(S.Boolean), contentConverter: S.optional(S.Boolean.pipe(T.Body("content_converter"))), disableApps: S.optional(S.Boolean.pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.Boolean.pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.Boolean.pipe(T.Body("disable_rum"))), disableZaraz: S.optional(S.Boolean.pipe(T.Body("disable_zaraz"))), emailObfuscation: S.optional(S.Boolean.pipe(T.Body("email_obfuscation"))), fonts: S.optional(S.Boolean), hotlinkProtection: S.optional( S.Boolean.pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.Boolean), opportunisticEncryption: S.optional( S.Boolean.pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( UpdateRequestRulesItemSetConfigRuleActionParametersPolish, ), redirectsForAiTraining: S.optional( S.Boolean.pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( UpdateRequestRulesItemSetConfigRuleActionParametersRequestBodyBuffering.pipe( T.Body("request_body_buffering"), ), ), responseBodyBuffering: S.optional( UpdateRequestRulesItemSetConfigRuleActionParametersResponseBodyBuffering.pipe( T.Body("response_body_buffering"), ), ), rocketLoader: S.optional(S.Boolean.pipe(T.Body("rocket_loader"))), securityLevel: S.optional( UpdateRequestRulesItemSetConfigRuleActionParametersSecurityLevel.pipe( T.Body("security_level"), ), ), serverSideExcludes: S.optional( S.Boolean.pipe(T.Body("server_side_excludes")), ), ssl: S.optional(UpdateRequestRulesItemSetConfigRuleActionParametersSsl), sxg: S.optional(S.Boolean), }), ).annotate({ identifier: "UpdateRequestRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemSetConfigRuleCategoriesList = Array; export const UpdateRequestRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemSetConfigRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemSetConfigRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemSetConfigRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemSetConfigRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemSetConfigRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemSetConfigRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemSetConfigRuleAction), actionParameters: S.optional( UpdateRequestRulesItemSetConfigRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemSetConfigRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemSetConfigRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemSetConfigRule", }) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleAction = "skip"; export const UpdateRequestRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSkipRuleActionParametersPhase = "current"; export const UpdateRequestRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const UpdateRequestRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSkipRuleActionParametersPhasesList = Array< UpdateRequestRulesItemSkipRuleActionParametersPhasesItem | (string & {}) >; export const UpdateRequestRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( UpdateRequestRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const UpdateRequestRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSkipRuleActionParametersProductsList = Array< UpdateRequestRulesItemSkipRuleActionParametersProductsItem | (string & {}) >; export const UpdateRequestRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( UpdateRequestRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleActionParametersRulesValueList = Array; export const UpdateRequestRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | UpdateRequestRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const UpdateRequestRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, UpdateRequestRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleActionParametersRuleset = "current"; export const UpdateRequestRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemSkipRuleActionParametersRulesetsList = Array; export const UpdateRequestRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: UpdateRequestRulesItemSkipRuleActionParametersPhase | (string & {}); /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: UpdateRequestRulesItemSkipRuleActionParametersPhasesList; /** A list of legacy security products to skip the execution of. */ products?: UpdateRequestRulesItemSkipRuleActionParametersProductsList; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: UpdateRequestRulesItemSkipRuleActionParametersRulesMap; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: | UpdateRequestRulesItemSkipRuleActionParametersRuleset | (string & {}); /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: UpdateRequestRulesItemSkipRuleActionParametersRulesetsList; } export const UpdateRequestRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional(UpdateRequestRulesItemSkipRuleActionParametersPhase), phases: S.optional( UpdateRequestRulesItemSkipRuleActionParametersPhasesList, ), products: S.optional( UpdateRequestRulesItemSkipRuleActionParametersProductsList, ), rules: S.optional(UpdateRequestRulesItemSkipRuleActionParametersRulesMap), ruleset: S.optional( UpdateRequestRulesItemSkipRuleActionParametersRuleset, ), rulesets: S.optional( UpdateRequestRulesItemSkipRuleActionParametersRulesetsList, ), }), ).annotate({ identifier: "UpdateRequestRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleCategoriesList = Array; export const UpdateRequestRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateRequestRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemSkipRule { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemSkipRuleAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: UpdateRequestRulesItemSkipRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemSkipRuleCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemSkipRuleRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemSkipRuleAction), actionParameters: S.optional( UpdateRequestRulesItemSkipRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional(UpdateRequestRulesItemSkipRuleCategoriesList), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional(UpdateRequestRulesItemSkipRuleRatelimit), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemSkipRule", }) as any as S.Schema; export type UpdateRequestRulesItemTransformResponseHTMLAction = "transform_response_html"; export const UpdateRequestRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type UpdateRequestRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const UpdateRequestRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type UpdateRequestRulesItemTransformResponseHTMLCategoriesList = Array; export const UpdateRequestRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateRequestRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateRequestRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const UpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateRequestRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string; } export const UpdateRequestRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateRequestRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.String.pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.Number.pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.Number.pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.Boolean.pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional(S.Number.pipe(T.Body("score_per_period"))), scoreResponseHeaderName: S.optional( S.String.pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateRequestRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface UpdateRequestRulesItemTransformResponseHTML { /** The unique ID of the rule. */ id?: string; /** The action to perform when the rule matches. */ action?: UpdateRequestRulesItemTransformResponseHTMLAction | (string & {}); /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; /** The categories of the rule. */ categories?: UpdateRequestRulesItemTransformResponseHTMLCategoriesList; /** An informative description of the rule. */ description?: string; /** Whether the rule should be executed. */ enabled?: boolean; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; /** The expression defining which traffic will match the rule. */ expression?: string; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateRequestRulesItemTransformResponseHTMLRatelimit; /** The reference of the rule (the rule's ID by default). */ ref?: string; } export const UpdateRequestRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), action: S.optional(UpdateRequestRulesItemTransformResponseHTMLAction), actionParameters: S.optional( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters.pipe( T.Body("action_parameters"), ), ), categories: S.optional( UpdateRequestRulesItemTransformResponseHTMLCategoriesList, ), description: S.optional(S.String), enabled: S.optional(S.Boolean), exposedCredentialCheck: S.optional( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck.pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.String), logging: S.optional(RulesCreateRequestBodyChallengeRuleLogging), ratelimit: S.optional( UpdateRequestRulesItemTransformResponseHTMLRatelimit, ), ref: S.optional(S.String), }), ).annotate({ identifier: "UpdateRequestRulesItemTransformResponseHTML", }) as any as S.Schema; export type UpdateRequestRulesItem = | UpdateRequestRulesItemBlockRule | UpdateRequestRulesItemChallenge | UpdateRequestRulesItemCompressResponseRule | UpdateRequestRulesItemDDoSDynamicRule | UpdateRequestRulesItemExecuteRule | UpdateRequestRulesItemForceConnectionCloseRule | UpdateRequestRulesItemJSChallenge | UpdateRequestRulesItemLogRule | UpdateRequestRulesItemLogCustomFieldRule | UpdateRequestRulesItemManagedChallengeRule | UpdateRequestRulesItemRedirectRule | UpdateRequestRulesItemRewriteRule | UpdateRequestRulesItemRouteRule | UpdateRequestRulesItemScoreRule | UpdateRequestRulesItemServeErrorRule | UpdateRequestRulesItemSetCacheControl | UpdateRequestRulesItemSetCacheSettingsRule | UpdateRequestRulesItemSetCacheTags | UpdateRequestRulesItemSetConfigRule | UpdateRequestRulesItemSkipRule | UpdateRequestRulesItemTransformResponseHTML; export const UpdateRequestRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type UpdateRequestRulesList = Array; export const UpdateRequestRulesList = /*@__PURE__*/ S.Array( UpdateRequestRulesItem, ) as any as S.Schema; export interface UpdateRulesetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** An informative description of the ruleset. */ description?: string; /** The kind of the ruleset. */ kind?: UpdateRequestKind | (string & {}); /** The human-readable name of the ruleset. */ name?: string; /** The phase of the ruleset. */ phase?: UpdateRequestPhase | (string & {}); /** The list of rules in the ruleset. */ rules?: UpdateRequestRulesList; } export const UpdateRulesetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), description: S.optional(S.String), kind: S.optional(UpdateRequestKind), name: S.optional(S.String), phase: S.optional(UpdateRequestPhase), rules: S.optional(UpdateRequestRulesList), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/rulesets/{ruleset_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateRulesetForAccountRequest", }) as any as S.Schema; export type UpdateResponseKind = "managed" | "custom" | "root" | "zone"; export const UpdateResponseKind = /*@__PURE__*/ S.String; export type UpdateResponsePhase = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const UpdateResponsePhase = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemBlockRuleAction = "block"; export const UpdateResponseRulesItemBlockRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export const UpdateResponseRulesItemBlockRuleActionParametersResponse = RulesCreateResponseRulesItemBlockRuleActionParametersResponse; export type UpdateResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export const UpdateResponseRulesItemBlockRuleActionParameters = RulesCreateResponseRulesItemBlockRuleActionParameters; export type UpdateResponseRulesItemBlockRuleCategoriesList = Array; export const UpdateResponseRulesItemBlockRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemBlockRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export const UpdateResponseRulesItemBlockRuleLogging = RulesCreateRequestBodyChallengeRuleLogging; export type UpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemBlockRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemBlockRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemBlockRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemBlockRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemBlockRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemBlockRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemBlockRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemBlockRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemBlockRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemBlockRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemBlockRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemBlockRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemBlockRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(UpdateResponseRulesItemBlockRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemBlockRule", }) as any as S.Schema; export type UpdateResponseRulesItemChallengeAction = "challenge"; export const UpdateResponseRulesItemChallengeAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemChallengeCategoriesList = Array; export const UpdateResponseRulesItemChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemChallengeRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemChallengeRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(UpdateResponseRulesItemChallengeRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemChallenge", }) as any as S.Schema; export type UpdateResponseRulesItemCompressResponseRuleAction = "compress_response"; export const UpdateResponseRulesItemCompressResponseRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = | "none" | "auto" | "default" | "gzip" | "brotli" | "zstd"; export const UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem { /** Name of the compression algorithm to enable. */ name?: UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName | null; } export const UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional( S.NullOr( UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItemName, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem", }) as any as S.Schema; export type UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = Array; export const UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList = /*@__PURE__*/ S.Array( UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsItem, ) as any as S.Schema; export interface UpdateResponseRulesItemCompressResponseRuleActionParameters { /** Custom order for compression algorithms. */ algorithms: UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList; } export const UpdateResponseRulesItemCompressResponseRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ algorithms: UpdateResponseRulesItemCompressResponseRuleActionParametersAlgorithmsList, }), ).annotate({ identifier: "UpdateResponseRulesItemCompressResponseRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemCompressResponseRuleCategoriesList = Array; export const UpdateResponseRulesItemCompressResponseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemCompressResponseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemCompressResponseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemCompressResponseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemCompressResponseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemCompressResponseRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemCompressResponseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemCompressResponseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemCompressResponseRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemCompressResponseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemCompressResponseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemCompressResponseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemCompressResponseRuleAction), ), actionParameters: S.optional( S.NullOr( UpdateResponseRulesItemCompressResponseRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemCompressResponseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemCompressResponseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemCompressResponseRule", }) as any as S.Schema; export type UpdateResponseRulesItemDDoSDynamicRuleAction = "ddos_dynamic"; export const UpdateResponseRulesItemDDoSDynamicRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemDDoSDynamicRuleCategoriesList = Array; export const UpdateResponseRulesItemDDoSDynamicRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemDDoSDynamicRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemDDoSDynamicRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemDDoSDynamicRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemDDoSDynamicRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemDDoSDynamicRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemDDoSDynamicRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemDDoSDynamicRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemDDoSDynamicRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemDDoSDynamicRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemDDoSDynamicRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemDDoSDynamicRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemDDoSDynamicRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemDDoSDynamicRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemDDoSDynamicRule", }) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleAction = "execute"; export const UpdateResponseRulesItemExecuteRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export const UpdateResponseRulesItemExecuteRuleActionParametersMatchedData = RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData; export type UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem { /** The name of the category to override. */ category: string; /** The action to override rules in the category with. */ action?: string | null; /** Whether to enable execution of rules in the category. */ enabled?: boolean | null; /** The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. */ sensitivityLevel?: UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel | null; } export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ category: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sensitivityLevel: S.optional( S.NullOr( UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem", }) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = Array; export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList = /*@__PURE__*/ S.Array( UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesItem, ) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem { /** The ID of the rule to override. */ id: string; /** The action to override the rule with. */ action?: string | null; /** Whether to enable execution of the rule. */ enabled?: boolean | null; /** The score threshold to use for the rule. */ scoreThreshold?: number | null; /** The sensitivity level to use for the rule. This option is only applicable for DDoS phases. */ sensitivityLevel?: UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel | null; } export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), scoreThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("score_threshold")), ), sensitivityLevel: S.optional( S.NullOr( UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItemSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem", }) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = Array; export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList = /*@__PURE__*/ S.Array( UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesItem, ) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = | "default" | "medium" | "low" | "eoff"; export const UpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemExecuteRuleActionParametersOverrides { /** An action to override all rules with. This option has lower precedence than rule and category overrides. */ action?: string | null; /** A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. */ categories?: UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList | null; /** Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. */ enabled?: boolean | null; /** A list of rule-level overrides. This option has the highest precedence. */ rules?: UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList | null; /** A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. */ sensitivityLevel?: UpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel | null; } export const UpdateResponseRulesItemExecuteRuleActionParametersOverrides = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(S.NullOr(S.String)), categories: S.optional( S.NullOr( UpdateResponseRulesItemExecuteRuleActionParametersOverridesCategoriesList, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rules: S.optional( S.NullOr( UpdateResponseRulesItemExecuteRuleActionParametersOverridesRulesList, ), ), sensitivityLevel: S.optional( S.NullOr( UpdateResponseRulesItemExecuteRuleActionParametersOverridesSensitivityLevel, ).pipe(T.Body("sensitivity_level")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemExecuteRuleActionParametersOverrides", }) as any as S.Schema; export interface UpdateResponseRulesItemExecuteRuleActionParameters { /** The ID of the ruleset to execute. */ id: string; /** The configuration to use for matched data logging. */ matchedData?: RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData | null; /** A set of overrides to apply to the target ruleset. */ overrides?: UpdateResponseRulesItemExecuteRuleActionParametersOverrides | null; } export const UpdateResponseRulesItemExecuteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, matchedData: S.optional( S.NullOr( RulesCreateResponseRulesItemExecuteRuleActionParametersMatchedData, ).pipe(T.Body("matched_data")), ), overrides: S.optional( S.NullOr(UpdateResponseRulesItemExecuteRuleActionParametersOverrides), ), }), ).annotate({ identifier: "UpdateResponseRulesItemExecuteRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleCategoriesList = Array; export const UpdateResponseRulesItemExecuteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemExecuteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemExecuteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemExecuteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemExecuteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemExecuteRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemExecuteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemExecuteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemExecuteRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemExecuteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemExecuteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemExecuteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemExecuteRuleAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemExecuteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemExecuteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemExecuteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemExecuteRule", }) as any as S.Schema; export type UpdateResponseRulesItemForceConnectionCloseRuleAction = "force_connection_close"; export const UpdateResponseRulesItemForceConnectionCloseRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemForceConnectionCloseRuleCategoriesList = Array; export const UpdateResponseRulesItemForceConnectionCloseRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemForceConnectionCloseRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemForceConnectionCloseRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemForceConnectionCloseRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemForceConnectionCloseRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemForceConnectionCloseRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemForceConnectionCloseRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemForceConnectionCloseRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemForceConnectionCloseRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemForceConnectionCloseRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemForceConnectionCloseRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemForceConnectionCloseRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemForceConnectionCloseRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemForceConnectionCloseRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemForceConnectionCloseRule", }) as any as S.Schema; export type UpdateResponseRulesItemJSChallengeAction = "js_challenge"; export const UpdateResponseRulesItemJSChallengeAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemJSChallengeCategoriesList = Array; export const UpdateResponseRulesItemJSChallengeCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemJSChallengeExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemJSChallengeRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemJSChallengeRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemJSChallengeRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemJSChallengeRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemJSChallenge { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemJSChallengeAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemJSChallengeCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemJSChallengeRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemJSChallenge = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemJSChallengeAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemJSChallengeCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemJSChallengeRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemJSChallenge", }) as any as S.Schema; export type UpdateResponseRulesItemLogRuleAction = "log"; export const UpdateResponseRulesItemLogRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemLogRuleCategoriesList = Array; export const UpdateResponseRulesItemLogRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemLogRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemLogRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemLogRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemLogRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemLogRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemLogRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateResponseRulesItemLogRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemLogRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemLogRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemLogRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemLogRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemLogRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemLogRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemLogRuleAction)), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemLogRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(UpdateResponseRulesItemLogRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemLogRule", }) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleAction = "log_custom_field"; export const UpdateResponseRulesItemLogCustomFieldRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsItem, ) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsItem, ) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsItem = RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem; export type UpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsItem, ) as any as S.Schema; export interface UpdateResponseRulesItemLogCustomFieldRuleActionParameters { /** The cookie fields to log. */ cookieFields?: UpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList | null; /** The raw response fields to log. */ rawResponseFields?: UpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList | null; /** The raw request fields to log. */ requestFields?: UpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList | null; /** The transformed response fields to log. */ responseFields?: UpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList | null; /** The transformed request fields to log. */ transformedRequestFields?: UpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList | null; } export const UpdateResponseRulesItemLogCustomFieldRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ cookieFields: S.optional( S.NullOr( UpdateResponseRulesItemLogCustomFieldRuleActionParametersCookieFieldsList, ).pipe(T.Body("cookie_fields")), ), rawResponseFields: S.optional( S.NullOr( UpdateResponseRulesItemLogCustomFieldRuleActionParametersRawResponseFieldsList, ).pipe(T.Body("raw_response_fields")), ), requestFields: S.optional( S.NullOr( UpdateResponseRulesItemLogCustomFieldRuleActionParametersRequestFieldsList, ).pipe(T.Body("request_fields")), ), responseFields: S.optional( S.NullOr( UpdateResponseRulesItemLogCustomFieldRuleActionParametersResponseFieldsList, ).pipe(T.Body("response_fields")), ), transformedRequestFields: S.optional( S.NullOr( UpdateResponseRulesItemLogCustomFieldRuleActionParametersTransformedRequestFieldsList, ).pipe(T.Body("transformed_request_fields")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemLogCustomFieldRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleCategoriesList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemLogCustomFieldRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemLogCustomFieldRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemLogCustomFieldRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemLogCustomFieldRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemLogCustomFieldRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemLogCustomFieldRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemLogCustomFieldRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemLogCustomFieldRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemLogCustomFieldRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemLogCustomFieldRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemLogCustomFieldRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemLogCustomFieldRuleAction), ), actionParameters: S.optional( S.NullOr( UpdateResponseRulesItemLogCustomFieldRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemLogCustomFieldRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemLogCustomFieldRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemLogCustomFieldRule", }) as any as S.Schema; export type UpdateResponseRulesItemManagedChallengeRuleAction = "managed_challenge"; export const UpdateResponseRulesItemManagedChallengeRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemManagedChallengeRuleCategoriesList = Array; export const UpdateResponseRulesItemManagedChallengeRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemManagedChallengeRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemManagedChallengeRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemManagedChallengeRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemManagedChallengeRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemManagedChallengeRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemManagedChallengeRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemManagedChallengeRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: unknown | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemManagedChallengeRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemManagedChallengeRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemManagedChallengeRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemManagedChallengeRuleAction), ), actionParameters: S.optional( S.NullOr(S.Unknown).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemManagedChallengeRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemManagedChallengeRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemManagedChallengeRule", }) as any as S.Schema; export type UpdateResponseRulesItemRedirectRuleAction = "redirect"; export const UpdateResponseRulesItemRedirectRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export const UpdateResponseRulesItemRedirectRuleActionParametersFromList = RulesCreateResponseRulesItemRedirectRuleActionParametersFromList; export type UpdateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export const UpdateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl = RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; export type UpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = | 301 | 302 | 303 | 307 | 308; export const UpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode = /*@__PURE__*/ S.Number; export interface UpdateResponseRulesItemRedirectRuleActionParametersFromValue { /** A URL to redirect the request to. */ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl; /** Whether to keep the query string of the original request. */ preserveQueryString?: boolean | null; /** The status code to use for the redirect. */ statusCode?: UpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode | null; } export const UpdateResponseRulesItemRedirectRuleActionParametersFromValue = /*@__PURE__*/ S.suspend(() => S.Struct({ targetUrl: RulesCreateResponseRulesItemRedirectRuleActionParametersFromValueTargetUrl.pipe( T.Body("target_url"), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( UpdateResponseRulesItemRedirectRuleActionParametersFromValueStatusCode, ).pipe(T.Body("status_code")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemRedirectRuleActionParametersFromValue", }) as any as S.Schema; export interface UpdateResponseRulesItemRedirectRuleActionParameters { /** A redirect based on a bulk list lookup. */ fromList?: RulesCreateResponseRulesItemRedirectRuleActionParametersFromList | null; /** A redirect based on the request properties. */ fromValue?: UpdateResponseRulesItemRedirectRuleActionParametersFromValue | null; } export const UpdateResponseRulesItemRedirectRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ fromList: S.optional( S.NullOr( RulesCreateResponseRulesItemRedirectRuleActionParametersFromList, ).pipe(T.Body("from_list")), ), fromValue: S.optional( S.NullOr( UpdateResponseRulesItemRedirectRuleActionParametersFromValue, ).pipe(T.Body("from_value")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemRedirectRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemRedirectRuleCategoriesList = Array; export const UpdateResponseRulesItemRedirectRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemRedirectRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemRedirectRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemRedirectRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemRedirectRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemRedirectRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemRedirectRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemRedirectRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemRedirectRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemRedirectRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemRedirectRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemRedirectRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemRedirectRuleAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemRedirectRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemRedirectRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemRedirectRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemRedirectRule", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleAction = "rewrite"; export const UpdateResponseRulesItemRewriteRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"; export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader { /** The operation to perform on the header. */ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation; /** A static value for the header. */ value: string; } export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"; export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation; } export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeaderOperation, }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"; export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader { /** The operation to perform on the header. */ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation; /** A static value for the header. */ value: string; } export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeaderOperation, value: S.String, }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"; export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader { /** An expression that evaluates to a value for the header. */ expression: string; /** The operation to perform on the header. */ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation; } export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeaderOperation, }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"; export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader { /** The operation to perform on the header. */ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation; } export const UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeaderOperation, }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleActionParametersHeaders = | UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddStaticHeader | UpdateResponseRulesItemRewriteRuleActionParametersHeadersAddDynamicHeader | UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetStaticHeader | UpdateResponseRulesItemRewriteRuleActionParametersHeadersSetDynamicHeader | UpdateResponseRulesItemRewriteRuleActionParametersHeadersRemoveHeader; export const UpdateResponseRulesItemRewriteRuleActionParametersHeaders = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value"], ["expression", "operation"], ["operation", "value"], ["expression", "operation"], ["operation"], ]), ); export type UpdateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export const UpdateResponseRulesItemRewriteRuleActionParametersUriURIPathPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPathPath; export type UpdateResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export const UpdateResponseRulesItemRewriteRuleActionParametersUriURIPath = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath; export type UpdateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export const UpdateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQueryQuery; export type UpdateResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const UpdateResponseRulesItemRewriteRuleActionParametersUriURIQuery = RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export type UpdateResponseRulesItemRewriteRuleActionParametersUri = | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIPath | RulesCreateResponseRulesItemRewriteRuleActionParametersUriURIQuery; export const UpdateResponseRulesItemRewriteRuleActionParametersUri = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["path", "origin"], ["query", "origin"], ]), ); export interface UpdateResponseRulesItemRewriteRuleActionParameters { /** A map of headers to rewrite. */ headers?: UpdateResponseRulesItemRewriteRuleActionParametersHeaders | null; /** A URI path rewrite. */ uri?: UpdateResponseRulesItemRewriteRuleActionParametersUri | null; } export const UpdateResponseRulesItemRewriteRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ headers: S.optional( S.NullOr(UpdateResponseRulesItemRewriteRuleActionParametersHeaders), ), uri: S.optional( S.NullOr(UpdateResponseRulesItemRewriteRuleActionParametersUri), ), }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleCategoriesList = Array; export const UpdateResponseRulesItemRewriteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemRewriteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemRewriteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemRewriteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemRewriteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemRewriteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemRewriteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemRewriteRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemRewriteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemRewriteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemRewriteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemRewriteRuleAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemRewriteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemRewriteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemRewriteRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemRewriteRule", }) as any as S.Schema; export type UpdateResponseRulesItemRouteRuleAction = "route"; export const UpdateResponseRulesItemRouteRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export const UpdateResponseRulesItemRouteRuleActionParametersOrigin = RulesCreateResponseRulesItemRouteRuleActionParametersOrigin; export type UpdateResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export const UpdateResponseRulesItemRouteRuleActionParametersSni = RulesCreateResponseRulesItemRouteRuleActionParametersSni; export type UpdateResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export const UpdateResponseRulesItemRouteRuleActionParameters = RulesCreateResponseRulesItemRouteRuleActionParameters; export type UpdateResponseRulesItemRouteRuleCategoriesList = Array; export const UpdateResponseRulesItemRouteRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemRouteRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemRouteRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemRouteRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemRouteRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemRouteRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemRouteRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemRouteRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemRouteRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemRouteRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemRouteRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemRouteRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemRouteRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemRouteRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemRouteRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(UpdateResponseRulesItemRouteRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemRouteRule", }) as any as S.Schema; export type UpdateResponseRulesItemScoreRuleAction = "score"; export const UpdateResponseRulesItemScoreRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export const UpdateResponseRulesItemScoreRuleActionParameters = RulesCreateResponseRulesItemScoreRuleActionParameters; export type UpdateResponseRulesItemScoreRuleCategoriesList = Array; export const UpdateResponseRulesItemScoreRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemScoreRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemScoreRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemScoreRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemScoreRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemScoreRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemScoreRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemScoreRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateResponseRulesItemScoreRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemScoreRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemScoreRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemScoreRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemScoreRuleAction)), actionParameters: S.optional( S.NullOr(RulesCreateResponseRulesItemScoreRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemScoreRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(UpdateResponseRulesItemScoreRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemScoreRule", }) as any as S.Schema; export type UpdateResponseRulesItemServeErrorRuleAction = "serve_error"; export const UpdateResponseRulesItemServeErrorRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent { /** The response content. */ content: string; /** The content type header to set with the error response. */ contentType?: UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentType: S.optional( S.NullOr( UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContentContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent", }) as any as S.Schema; export type UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = | "application/json" | "text/html" | "text/plain" | "text/xml"; export const UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset { /** The name of a custom asset to serve as the error response. */ assetName: string; /** The content type header to set with the error response. */ contentType?: UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType | null; /** The status code to use for the error. */ statusCode?: number | null; } export const UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset = /*@__PURE__*/ S.suspend(() => S.Struct({ assetName: S.String.pipe(T.Body("asset_name")), contentType: S.optional( S.NullOr( UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAssetContentType, ).pipe(T.Body("content_type")), ), statusCode: S.optional(S.NullOr(S.Number).pipe(T.Body("status_code"))), }), ).annotate({ identifier: "UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset", }) as any as S.Schema; export type UpdateResponseRulesItemServeErrorRuleActionParameters = | UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersContent | UpdateResponseRulesItemServeErrorRuleActionParametersActionParametersAsset; export const UpdateResponseRulesItemServeErrorRuleActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentType", "statusCode"], ["assetName", "contentType", "statusCode"], ]), ); export type UpdateResponseRulesItemServeErrorRuleCategoriesList = Array; export const UpdateResponseRulesItemServeErrorRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemServeErrorRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemServeErrorRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemServeErrorRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemServeErrorRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemServeErrorRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemServeErrorRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemServeErrorRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemServeErrorRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemServeErrorRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemServeErrorRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemServeErrorRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemServeErrorRuleAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemServeErrorRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemServeErrorRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemServeErrorRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemServeErrorRule", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlAction = "set_cache_control"; export const UpdateResponseRulesItemSetCacheControlAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersImmutable = | UpdateResponseRulesItemSetCacheControlActionParametersImmutableSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersImmutableRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersImmutable = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersMaxAge = | UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersMaxAgeRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersMaxAge = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate = | UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidateRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand = | UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstandRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = Array; export const UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersNoCache = | UpdateResponseRulesItemSetCacheControlActionParametersNoCacheSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersNoCacheRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersNoCache = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersNoStore = | UpdateResponseRulesItemSetCacheControlActionParametersNoStoreSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersNoStoreRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersNoStore = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersNoTransform = | UpdateResponseRulesItemSetCacheControlActionParametersNoTransformSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersNoTransformRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersNoTransform = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = Array; export const UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; /** Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). */ qualifiers?: UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), qualifiers: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirectiveQualifiersList, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersPrivate = | UpdateResponseRulesItemSetCacheControlActionParametersPrivateSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersPrivateRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersPrivate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly", "qualifiers"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = | UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidateRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersPublic = | UpdateResponseRulesItemSetCacheControlActionParametersPublicSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersPublicRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersPublic = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersSMaxage = | UpdateResponseRulesItemSetCacheControlActionParametersSMaxageSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersSMaxageRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersSMaxage = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersStaleIfError = | UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersStaleIfErrorRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersStaleIfError = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export type UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation; /** The duration value in seconds for the directive. */ value: number; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirectiveOperation, value: S.Number, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = | "set" | "remove"; export const UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective { /** The operation to perform on the cache-control directive. */ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation; /** Whether the directive should only be applied to the Cloudflare CDN cache. */ cloudflareOnly?: boolean | null; } export const UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirectiveOperation, cloudflareOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cloudflare_only")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = | UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateSetDirective | UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidateRemoveDirective; export const UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "value", "cloudflareOnly"], ["operation", "cloudflareOnly"], ]), ); export interface UpdateResponseRulesItemSetCacheControlActionParameters { /** A cache-control directive configuration. */ immutable?: UpdateResponseRulesItemSetCacheControlActionParametersImmutable | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ maxAge?: UpdateResponseRulesItemSetCacheControlActionParametersMaxAge | null; /** A cache-control directive configuration. */ mustRevalidate?: UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate | null; /** A cache-control directive configuration. */ mustUnderstand?: UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ noCache?: UpdateResponseRulesItemSetCacheControlActionParametersNoCache | null; /** A cache-control directive configuration. */ noStore?: UpdateResponseRulesItemSetCacheControlActionParametersNoStore | null; /** A cache-control directive configuration. */ noTransform?: UpdateResponseRulesItemSetCacheControlActionParametersNoTransform | null; /** A cache-control directive configuration that accepts optional qualifiers (header names). */ private?: UpdateResponseRulesItemSetCacheControlActionParametersPrivate | null; /** A cache-control directive configuration. */ proxyRevalidate?: UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate | null; /** A cache-control directive configuration. */ public?: UpdateResponseRulesItemSetCacheControlActionParametersPublic | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ sMaxage?: UpdateResponseRulesItemSetCacheControlActionParametersSMaxage | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleIfError?: UpdateResponseRulesItemSetCacheControlActionParametersStaleIfError | null; /** A cache-control directive configuration that accepts a duration value in seconds. */ staleWhileRevalidate?: UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate | null; } export const UpdateResponseRulesItemSetCacheControlActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ immutable: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersImmutable, ), ), maxAge: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersMaxAge, ).pipe(T.Body("max-age")), ), mustRevalidate: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersMustRevalidate, ).pipe(T.Body("must-revalidate")), ), mustUnderstand: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersMustUnderstand, ).pipe(T.Body("must-understand")), ), noCache: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersNoCache, ).pipe(T.Body("no-cache")), ), noStore: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersNoStore, ).pipe(T.Body("no-store")), ), noTransform: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersNoTransform, ).pipe(T.Body("no-transform")), ), private: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheControlActionParametersPrivate), ), proxyRevalidate: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersProxyRevalidate, ).pipe(T.Body("proxy-revalidate")), ), public: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheControlActionParametersPublic), ), sMaxage: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersSMaxage, ).pipe(T.Body("s-maxage")), ), staleIfError: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersStaleIfError, ).pipe(T.Body("stale-if-error")), ), staleWhileRevalidate: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheControlActionParametersStaleWhileRevalidate, ).pipe(T.Body("stale-while-revalidate")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlCategoriesList = Array; export const UpdateResponseRulesItemSetCacheControlCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemSetCacheControlExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheControlRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemSetCacheControlRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemSetCacheControlRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControlRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheControl { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemSetCacheControlAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemSetCacheControlActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemSetCacheControlCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemSetCacheControlRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemSetCacheControl = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheControlAction), ), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheControlActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheControlCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheControlRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheControl", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleAction = "set_cache_settings"; export const UpdateResponseRulesItemSetCacheSettingsRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin" | "bypass"; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl { /** The browser TTL mode. */ mode: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode; /** The browser TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtlMode, default: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie { /** A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. */ checkPresence?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList | null; /** A list of cookies to include in the cache key. */ include?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieCheckPresenceList, ).pipe(T.Body("check_presence")), ), include: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieIncludeList, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = { [key: string]: | UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList | undefined; }; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap = /*@__PURE__*/ S.Record( S.String, UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsValueList, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader { /** A list of headers to check for the presence of. The presence of these headers is included in the cache key. */ checkPresence?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList | null; /** A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. */ contains?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap | null; /** Whether to exclude the origin header in the cache key. */ excludeOrigin?: boolean | null; /** A list of headers to include in the cache key. */ include?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader = /*@__PURE__*/ S.suspend(() => S.Struct({ checkPresence: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderCheckPresenceList, ).pipe(T.Body("check_presence")), ), contains: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderContainsMap, ), ), excludeOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_origin")), ), include: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderIncludeList, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude { /** Whether to exclude all query string parameters from the cache key. */ all?: boolean | null; /** A list of query string parameters to exclude from the cache key. */ list?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeListList, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude { /** Whether to include all query string parameters in the cache key. */ all?: boolean | null; /** A list of query string parameters to include in the cache key. */ list?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ all: S.optional(S.NullOr(S.Boolean)), list: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeListList, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude", }) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString { /** Which query string parameters to exclude from the cache key. */ exclude?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude | null; /** Which query string parameters to include in the cache key. */ include?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude, ), ), include: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey { /** Which cookies to include in the cache key. */ cookie?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie | null; /** Which headers to include in the cache key. */ header?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader | null; /** How to use the host in the cache key. */ host?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost | null; /** Which query string parameters to include in or exclude from the cache key. */ queryString?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString | null; /** How to use characteristics of the request user agent in the cache key. */ user?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cookie: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie, ), ), header: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader, ), ), host: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost, ), ), queryString: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString, ).pipe(T.Body("query_string")), ), user: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey", }) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey { /** Whether to separate cached content based on the visitor's device type. */ cacheByDeviceType?: boolean | null; /** Whether to protect from web cache deception attacks, while allowing static assets to be cached. */ cacheDeceptionArmor?: boolean | null; /** Which components of the request are included or excluded from the cache key. */ customKey?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey | null; /** Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. */ ignoreQueryStringsOrder?: boolean | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey = /*@__PURE__*/ S.suspend(() => S.Struct({ cacheByDeviceType: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_by_device_type")), ), cacheDeceptionArmor: S.optional( S.NullOr(S.Boolean).pipe(T.Body("cache_deception_armor")), ), customKey: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKeyCustomKey, ).pipe(T.Body("custom_key")), ), ignoreQueryStringsOrder: S.optional( S.NullOr(S.Boolean).pipe(T.Body("ignore_query_strings_order")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = | "respect_origin" | "bypass_by_default" | "override_origin"; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItemStatusCodeRange; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList = /*@__PURE__*/ S.Array( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlItem, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl { /** The edge TTL mode. */ mode: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode; /** The edge TTL (in seconds) if you choose the "override_origin" mode. */ default?: number | null; /** A list of TTLs to apply to specific status codes or status code ranges. */ statusCodeTtl?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl = /*@__PURE__*/ S.suspend(() => S.Struct({ mode: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlMode, default: S.optional(S.NullOr(S.Number)), statusCodeTtl: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtlStatusCodeTtlList, ).pipe(T.Body("status_code_ttl")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary = RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = | "bypass" | "passthrough" | "normalize"; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault { /** How the header value is treated when building the cache key. */ action: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ action: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefaultAction, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = | "bypass" | "passthrough" | "normalize"; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue { /** How the header value is treated when building the cache key. */ action: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction; /** The set of languages to normalize against. Only valid for the `accept-language` header. */ languages?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList | null; /** The set of media types to normalize against. Only valid for the `accept` header. */ mediaTypes?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue = /*@__PURE__*/ S.suspend(() => S.Struct({ action: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueAction, languages: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueLanguagesList, ), ), mediaTypes: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValueMediaTypesList, ).pipe(T.Body("media_types")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = { [key: string]: | UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue | undefined; }; export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap = /*@__PURE__*/ S.Record( S.String, UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersValue, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary { /** Controls how response Vary headers without a per-header override contribute to the cache key. */ default?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault | null; /** A mapping of lowercase request header names to their vary configuration. */ headers?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryDefault, ), ), headers: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVaryHeadersMap, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary", }) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleActionParameters { /** A list of additional ports that caching should be enabled on. */ additionalCacheablePorts?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList | null; /** How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. */ browserTtl?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl | null; /** Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. */ cache?: boolean | null; /** Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. */ cacheKey?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey | null; /** Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). */ cacheReserve?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve | null; /** How long the Cloudflare edge network should cache the response. */ edgeTtl?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl | null; /** Whether Cloudflare will aim to strictly adhere to RFC 7234. */ originCacheControl?: boolean | null; /** Whether to generate Cloudflare error pages for issues from the origin server. */ originErrorPagePassthru?: boolean | null; /** A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. */ readTimeout?: number | null; /** Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. */ respectStrongEtags?: boolean | null; /** When to serve stale content from cache. */ serveStale?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale | null; /** Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. */ sharedDictionary?: RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary | null; /** Whether to strip ETag headers from the origin response before caching. */ stripEtags?: boolean | null; /** Whether to strip Last-Modified headers from the origin response before caching. */ stripLastModified?: boolean | null; /** Whether to strip Set-Cookie headers from the origin response before caching. */ stripSetCookie?: boolean | null; /** Controls how cached responses vary based on request headers. `default` is required by the API and applies to any Vary response header that does not have a per-header override. */ vary?: UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ additionalCacheablePorts: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersAdditionalCacheablePortsList, ).pipe(T.Body("additional_cacheable_ports")), ), browserTtl: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersBrowserTtl, ).pipe(T.Body("browser_ttl")), ), cache: S.optional(S.NullOr(S.Boolean)), cacheKey: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersCacheKey, ).pipe(T.Body("cache_key")), ), cacheReserve: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersCacheReserve, ).pipe(T.Body("cache_reserve")), ), edgeTtl: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersEdgeTtl, ).pipe(T.Body("edge_ttl")), ), originCacheControl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_cache_control")), ), originErrorPagePassthru: S.optional( S.NullOr(S.Boolean).pipe(T.Body("origin_error_page_passthru")), ), readTimeout: S.optional(S.NullOr(S.Number).pipe(T.Body("read_timeout"))), respectStrongEtags: S.optional( S.NullOr(S.Boolean).pipe(T.Body("respect_strong_etags")), ), serveStale: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersServeStale, ).pipe(T.Body("serve_stale")), ), sharedDictionary: S.optional( S.NullOr( RulesCreateResponseRulesItemSetCacheSettingsRuleActionParametersSharedDictionary, ).pipe(T.Body("shared_dictionary")), ), stripEtags: S.optional(S.NullOr(S.Boolean).pipe(T.Body("strip_etags"))), stripLastModified: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_last_modified")), ), stripSetCookie: S.optional( S.NullOr(S.Boolean).pipe(T.Body("strip_set_cookie")), ), vary: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParametersVary, ), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleCategoriesList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemSetCacheSettingsRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemSetCacheSettingsRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemSetCacheSettingsRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheSettingsRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemSetCacheSettingsRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemSetCacheSettingsRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemSetCacheSettingsRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemSetCacheSettingsRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemSetCacheSettingsRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheSettingsRuleAction), ), actionParameters: S.optional( S.NullOr( UpdateResponseRulesItemSetCacheSettingsRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheSettingsRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheSettingsRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheSettingsRule", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsAction = "set_cache_tags"; export const UpdateResponseRulesItemSetCacheTagsAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = | "add" | "remove" | "set"; export const UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = Array; export const UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues { /** The operation to perform on the cache tags. */ operation: UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation; /** A list of cache tag values. */ values: UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList; } export const UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesOperation, values: UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValuesValuesList, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation; } export const UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpressionOperation, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = | "add" | "remove" | "set"; export const UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = Array; export const UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues { /** The operation to perform on the cache tags. */ operation: UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation; /** A list of cache tag values. */ values: UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList; } export const UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesOperation, values: UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValuesValuesList, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation; } export const UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpressionOperation, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = | "add" | "remove" | "set"; export const UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = Array; export const UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues { /** The operation to perform on the cache tags. */ operation: UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation; /** A list of cache tag values. */ values: UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList; } export const UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues = /*@__PURE__*/ S.suspend(() => S.Struct({ operation: UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesOperation, values: UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValuesValuesList, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = | "add" | "remove" | "set"; export const UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression { /** An expression that evaluates to an array of cache tag values. */ expression: string; /** The operation to perform on the cache tags. */ operation: UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation; } export const UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, operation: UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpressionOperation, }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression", }) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsActionParameters = | UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsValues | UpdateResponseRulesItemSetCacheTagsActionParametersAddCacheTagsExpression | UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsValues | UpdateResponseRulesItemSetCacheTagsActionParametersRemoveCacheTagsExpression | UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsValues | UpdateResponseRulesItemSetCacheTagsActionParametersSetCacheTagsExpression; export const UpdateResponseRulesItemSetCacheTagsActionParameters = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ["operation", "values"], ["expression", "operation"], ]), ); export type UpdateResponseRulesItemSetCacheTagsCategoriesList = Array; export const UpdateResponseRulesItemSetCacheTagsCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemSetCacheTagsExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheTagsRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemSetCacheTagsRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemSetCacheTagsRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTagsRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemSetCacheTags { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemSetCacheTagsAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemSetCacheTagsActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemSetCacheTagsCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemSetCacheTagsRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemSetCacheTags = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemSetCacheTagsAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheTagsActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheTagsCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemSetCacheTagsRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemSetCacheTags", }) as any as S.Schema; export type UpdateResponseRulesItemSetConfigRuleAction = "set_config"; export const UpdateResponseRulesItemSetConfigRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export const UpdateResponseRulesItemSetConfigRuleActionParametersAutominify = RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify; export type UpdateResponseRulesItemSetConfigRuleActionParametersPolish = | "off" | "lossless" | "lossy" | "webp"; export const UpdateResponseRulesItemSetConfigRuleActionParametersPolish = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = | "none" | "standard" | "full"; export const UpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = | "none" | "standard"; export const UpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = | "off" | "essentially_off" | "low" | "medium" | "high" | "under_attack"; export const UpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSetConfigRuleActionParametersSsl = | "off" | "flexible" | "full" | "strict" | "origin_pull"; export const UpdateResponseRulesItemSetConfigRuleActionParametersSsl = /*@__PURE__*/ S.String; export interface UpdateResponseRulesItemSetConfigRuleActionParameters { /** Whether to enable Automatic HTTPS Rewrites. */ automaticHttpsRewrites?: boolean | null; /** Which file extensions to minify automatically. */ autominify?: RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify | null; /** Whether to enable Browser Integrity Check (BIC). */ bic?: boolean | null; /** Whether to enable content conversion (e.g., HTML to Markdown). */ contentConverter?: boolean | null; /** Whether to disable Cloudflare Apps. */ disableApps?: boolean | null; /** Whether to disable Pay Per Crawl. */ disablePayPerCrawl?: boolean | null; /** Whether to disable Real User Monitoring (RUM). */ disableRum?: boolean | null; /** Whether to disable Zaraz. */ disableZaraz?: boolean | null; /** Whether to enable Email Obfuscation. */ emailObfuscation?: boolean | null; /** Whether to enable Cloudflare Fonts. */ fonts?: boolean | null; /** Whether to enable Hotlink Protection. */ hotlinkProtection?: boolean | null; /** Whether to enable Mirage. */ mirage?: boolean | null; /** Whether to enable Opportunistic Encryption. */ opportunisticEncryption?: boolean | null; /** The Polish level to configure. */ polish?: UpdateResponseRulesItemSetConfigRuleActionParametersPolish | null; /** Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. */ redirectsForAiTraining?: boolean | null; /** The request body buffering mode. */ requestBodyBuffering?: UpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering | null; /** The response body buffering mode. */ responseBodyBuffering?: UpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering | null; /** Whether to enable Rocket Loader. */ rocketLoader?: boolean | null; /** The Security Level to configure. */ securityLevel?: UpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel | null; /** Whether to enable Server-Side Excludes. */ serverSideExcludes?: boolean | null; /** The SSL level to configure. */ ssl?: UpdateResponseRulesItemSetConfigRuleActionParametersSsl | null; /** Whether to enable Signed Exchanges (SXG). */ sxg?: boolean | null; } export const UpdateResponseRulesItemSetConfigRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ automaticHttpsRewrites: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_https_rewrites")), ), autominify: S.optional( S.NullOr( RulesCreateResponseRulesItemSetConfigRuleActionParametersAutominify, ), ), bic: S.optional(S.NullOr(S.Boolean)), contentConverter: S.optional( S.NullOr(S.Boolean).pipe(T.Body("content_converter")), ), disableApps: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_apps"))), disablePayPerCrawl: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_pay_per_crawl")), ), disableRum: S.optional(S.NullOr(S.Boolean).pipe(T.Body("disable_rum"))), disableZaraz: S.optional( S.NullOr(S.Boolean).pipe(T.Body("disable_zaraz")), ), emailObfuscation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("email_obfuscation")), ), fonts: S.optional(S.NullOr(S.Boolean)), hotlinkProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("hotlink_protection")), ), mirage: S.optional(S.NullOr(S.Boolean)), opportunisticEncryption: S.optional( S.NullOr(S.Boolean).pipe(T.Body("opportunistic_encryption")), ), polish: S.optional( S.NullOr(UpdateResponseRulesItemSetConfigRuleActionParametersPolish), ), redirectsForAiTraining: S.optional( S.NullOr(S.Boolean).pipe(T.Body("redirects_for_ai_training")), ), requestBodyBuffering: S.optional( S.NullOr( UpdateResponseRulesItemSetConfigRuleActionParametersRequestBodyBuffering, ).pipe(T.Body("request_body_buffering")), ), responseBodyBuffering: S.optional( S.NullOr( UpdateResponseRulesItemSetConfigRuleActionParametersResponseBodyBuffering, ).pipe(T.Body("response_body_buffering")), ), rocketLoader: S.optional( S.NullOr(S.Boolean).pipe(T.Body("rocket_loader")), ), securityLevel: S.optional( S.NullOr( UpdateResponseRulesItemSetConfigRuleActionParametersSecurityLevel, ).pipe(T.Body("security_level")), ), serverSideExcludes: S.optional( S.NullOr(S.Boolean).pipe(T.Body("server_side_excludes")), ), ssl: S.optional( S.NullOr(UpdateResponseRulesItemSetConfigRuleActionParametersSsl), ), sxg: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "UpdateResponseRulesItemSetConfigRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemSetConfigRuleCategoriesList = Array; export const UpdateResponseRulesItemSetConfigRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemSetConfigRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSetConfigRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemSetConfigRuleRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemSetConfigRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSetConfigRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemSetConfigRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemSetConfigRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemSetConfigRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemSetConfigRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemSetConfigRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemSetConfigRule = /*@__PURE__*/ S.suspend( () => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemSetConfigRuleAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemSetConfigRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemSetConfigRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemSetConfigRuleRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemSetConfigRule", }) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleAction = "skip"; export const UpdateResponseRulesItemSkipRuleAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSkipRuleActionParametersPhase = "current"; export const UpdateResponseRulesItemSkipRuleActionParametersPhase = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSkipRuleActionParametersPhasesItem = | "ddos_l4" | "ddos_l7" | "http_config_settings" | "http_custom_errors" | "http_log_custom_fields" | "http_ratelimit" | "http_request_cache_settings" | "http_request_dynamic_redirect" | "http_request_firewall_custom" | "http_request_firewall_managed" | "http_request_late_transform" | "http_request_origin" | "http_request_redirect" | "http_request_sanitize" | "http_request_sbfm" | "http_request_transform" | "http_response_cache_settings" | "http_response_compression" | "http_response_firewall_managed" | "http_response_headers_transform" | "magic_transit" | "magic_transit_ids_managed" | "magic_transit_managed" | "magic_transit_ratelimit"; export const UpdateResponseRulesItemSkipRuleActionParametersPhasesItem = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSkipRuleActionParametersPhasesList = Array; export const UpdateResponseRulesItemSkipRuleActionParametersPhasesList = /*@__PURE__*/ S.Array( UpdateResponseRulesItemSkipRuleActionParametersPhasesItem, ) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleActionParametersProductsItem = | "bic" | "hot" | "rateLimit" | "securityLevel" | "uaBlock" | "waf" | "zoneLockdown"; export const UpdateResponseRulesItemSkipRuleActionParametersProductsItem = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSkipRuleActionParametersProductsList = Array; export const UpdateResponseRulesItemSkipRuleActionParametersProductsList = /*@__PURE__*/ S.Array( UpdateResponseRulesItemSkipRuleActionParametersProductsItem, ) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleActionParametersRulesValueList = Array; export const UpdateResponseRulesItemSkipRuleActionParametersRulesValueList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleActionParametersRulesMap = { [key: string]: | UpdateResponseRulesItemSkipRuleActionParametersRulesValueList | undefined; }; export const UpdateResponseRulesItemSkipRuleActionParametersRulesMap = /*@__PURE__*/ S.Record( S.String, UpdateResponseRulesItemSkipRuleActionParametersRulesValueList, ) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleActionParametersRuleset = "current"; export const UpdateResponseRulesItemSkipRuleActionParametersRuleset = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemSkipRuleActionParametersRulesetsList = Array; export const UpdateResponseRulesItemSkipRuleActionParametersRulesetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSkipRuleActionParameters { /** A phase to skip the execution of. This option is only compatible with the products option. */ phase?: UpdateResponseRulesItemSkipRuleActionParametersPhase | null; /** A list of phases to skip the execution of. This option is incompatible with the rulesets option. */ phases?: UpdateResponseRulesItemSkipRuleActionParametersPhasesList | null; /** A list of legacy security products to skip the execution of. */ products?: UpdateResponseRulesItemSkipRuleActionParametersProductsList | null; /** A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. */ rules?: UpdateResponseRulesItemSkipRuleActionParametersRulesMap | null; /** A ruleset to skip the execution of. This option is incompatible with the rulesets option. */ ruleset?: UpdateResponseRulesItemSkipRuleActionParametersRuleset | null; /** A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. */ rulesets?: UpdateResponseRulesItemSkipRuleActionParametersRulesetsList | null; } export const UpdateResponseRulesItemSkipRuleActionParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ phase: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParametersPhase), ), phases: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParametersPhasesList), ), products: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParametersProductsList), ), rules: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParametersRulesMap), ), ruleset: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParametersRuleset), ), rulesets: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParametersRulesetsList), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSkipRuleActionParameters", }) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleCategoriesList = Array; export const UpdateResponseRulesItemSkipRuleCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemSkipRuleExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemSkipRuleRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemSkipRuleRatelimit = /*@__PURE__*/ S.suspend( () => S.Struct({ characteristics: UpdateResponseRulesItemSkipRuleRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemSkipRuleRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemSkipRule { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemSkipRuleAction | null; /** The parameters configuring the rule's action. */ actionParameters?: UpdateResponseRulesItemSkipRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemSkipRuleCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemSkipRuleRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemSkipRule = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional(S.NullOr(UpdateResponseRulesItemSkipRuleAction)), actionParameters: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleActionParameters).pipe( T.Body("action_parameters"), ), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemSkipRuleCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr(RulesCreateRequestBodyChallengeRuleExposedCredentialCheck).pipe( T.Body("exposed_credential_check"), ), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional(S.NullOr(UpdateResponseRulesItemSkipRuleRatelimit)), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemSkipRule", }) as any as S.Schema; export type UpdateResponseRulesItemTransformResponseHTMLAction = "transform_response_html"; export const UpdateResponseRulesItemTransformResponseHTMLAction = /*@__PURE__*/ S.String; export type UpdateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export const UpdateResponseRulesItemTransformResponseHTMLActionParameters = RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters; export type UpdateResponseRulesItemTransformResponseHTMLCategoriesList = Array; export const UpdateResponseRulesItemTransformResponseHTMLCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export const UpdateResponseRulesItemTransformResponseHTMLExposedCredentialCheck = RulesCreateRequestBodyChallengeRuleExposedCredentialCheck; export type UpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = Array; export const UpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateResponseRulesItemTransformResponseHTMLRatelimit { /** Characteristics of the request on which the rate limit counter will be incremented. */ characteristics: UpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList; /** Period in seconds over which the counter is being incremented. */ period: number; /** An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. */ countingExpression?: string | null; /** Period of time in seconds after which the action will be disabled following its first execution. */ mitigationTimeout?: number | null; /** The threshold of requests per period after which the action will be executed for the first time. */ requestsPerPeriod?: number | null; /** Whether counting is only performed when an origin is reached. */ requestsToOrigin?: boolean | null; /** The score threshold per period for which the action will be executed the first time. */ scorePerPeriod?: number | null; /** A response header name provided by the origin, which contains the score to increment rate limit counter with. */ scoreResponseHeaderName?: string | null; } export const UpdateResponseRulesItemTransformResponseHTMLRatelimit = /*@__PURE__*/ S.suspend(() => S.Struct({ characteristics: UpdateResponseRulesItemTransformResponseHTMLRatelimitCharacteristicsList, period: S.Number, countingExpression: S.optional( S.NullOr(S.String).pipe(T.Body("counting_expression")), ), mitigationTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("mitigation_timeout")), ), requestsPerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("requests_per_period")), ), requestsToOrigin: S.optional( S.NullOr(S.Boolean).pipe(T.Body("requests_to_origin")), ), scorePerPeriod: S.optional( S.NullOr(S.Number).pipe(T.Body("score_per_period")), ), scoreResponseHeaderName: S.optional( S.NullOr(S.String).pipe(T.Body("score_response_header_name")), ), }), ).annotate({ identifier: "UpdateResponseRulesItemTransformResponseHTMLRatelimit", }) as any as S.Schema; export interface UpdateResponseRulesItemTransformResponseHTML { /** The timestamp of when the rule was last modified. */ lastUpdated: string; /** The version of the rule. */ version: string; /** The unique ID of the rule. */ id?: string | null; /** The action to perform when the rule matches. */ action?: UpdateResponseRulesItemTransformResponseHTMLAction | null; /** The parameters configuring the rule's action. */ actionParameters?: RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters | null; /** The categories of the rule. */ categories?: UpdateResponseRulesItemTransformResponseHTMLCategoriesList | null; /** An informative description of the rule. */ description?: string | null; /** Whether the rule should be executed. */ enabled?: boolean | null; /** Configuration for exposed credential checking. */ exposedCredentialCheck?: RulesCreateRequestBodyChallengeRuleExposedCredentialCheck | null; /** The expression defining which traffic will match the rule. */ expression?: string | null; /** An object configuring the rule's logging behavior. */ logging?: RulesCreateRequestBodyChallengeRuleLogging | null; /** An object configuring the rule's rate limit behavior. */ ratelimit?: UpdateResponseRulesItemTransformResponseHTMLRatelimit | null; /** The reference of the rule (the rule's ID by default). */ ref?: string | null; } export const UpdateResponseRulesItemTransformResponseHTML = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), version: S.String, id: S.optional(S.NullOr(S.String)), action: S.optional( S.NullOr(UpdateResponseRulesItemTransformResponseHTMLAction), ), actionParameters: S.optional( S.NullOr( RulesCreateRequestBodyTransformResponseHTMLRuleActionParameters, ).pipe(T.Body("action_parameters")), ), categories: S.optional( S.NullOr(UpdateResponseRulesItemTransformResponseHTMLCategoriesList), ), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), exposedCredentialCheck: S.optional( S.NullOr( RulesCreateRequestBodyChallengeRuleExposedCredentialCheck, ).pipe(T.Body("exposed_credential_check")), ), expression: S.optional(S.NullOr(S.String)), logging: S.optional(S.NullOr(RulesCreateRequestBodyChallengeRuleLogging)), ratelimit: S.optional( S.NullOr(UpdateResponseRulesItemTransformResponseHTMLRatelimit), ), ref: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UpdateResponseRulesItemTransformResponseHTML", }) as any as S.Schema; export type UpdateResponseRulesItem = | UpdateResponseRulesItemBlockRule | UpdateResponseRulesItemChallenge | UpdateResponseRulesItemCompressResponseRule | UpdateResponseRulesItemDDoSDynamicRule | UpdateResponseRulesItemExecuteRule | UpdateResponseRulesItemForceConnectionCloseRule | UpdateResponseRulesItemJSChallenge | UpdateResponseRulesItemLogRule | UpdateResponseRulesItemLogCustomFieldRule | UpdateResponseRulesItemManagedChallengeRule | UpdateResponseRulesItemRedirectRule | UpdateResponseRulesItemRewriteRule | UpdateResponseRulesItemRouteRule | UpdateResponseRulesItemScoreRule | UpdateResponseRulesItemServeErrorRule | UpdateResponseRulesItemSetCacheControl | UpdateResponseRulesItemSetCacheSettingsRule | UpdateResponseRulesItemSetCacheTags | UpdateResponseRulesItemSetConfigRule | UpdateResponseRulesItemSkipRule | UpdateResponseRulesItemTransformResponseHTML; export const UpdateResponseRulesItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], [ "lastUpdated", "version", "id", "action", "actionParameters", "categories", "description", "enabled", "exposedCredentialCheck", "expression", "logging", "ratelimit", "ref", ], ]), ); export type UpdateResponseRulesList = Array; export const UpdateResponseRulesList = /*@__PURE__*/ S.Array( UpdateResponseRulesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateRulesetResponse { /** The unique ID of the ruleset. */ id: string; /** The kind of the ruleset. */ kind: UpdateResponseKind; /** The timestamp of when the ruleset was last modified. */ lastUpdated: string; /** The human-readable name of the ruleset. */ name: string; /** The phase of the ruleset. */ phase: UpdateResponsePhase; /** The list of rules in the ruleset. */ rules: UpdateResponseRulesList; /** The version of the ruleset. */ version: string; /** An informative description of the ruleset. */ description?: string | null; } export const UpdateRulesetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, kind: UpdateResponseKind, lastUpdated: S.String.pipe(T.Body("last_updated")), name: S.String, phase: UpdateResponsePhase, rules: UpdateResponseRulesList, version: S.String, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateRulesetResponse", }) as any as S.Schema; export interface UpdateRulesetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique ID of the ruleset. */ rulesetId: string; /** An informative description of the ruleset. */ description?: string; /** The kind of the ruleset. */ kind?: UpdateRequestKind | (string & {}); /** The human-readable name of the ruleset. */ name?: string; /** The phase of the ruleset. */ phase?: UpdateRequestPhase | (string & {}); /** The list of rules in the ruleset. */ rules?: UpdateRequestRulesList; } export const UpdateRulesetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), rulesetId: S.String.pipe(T.Label("ruleset_id")), description: S.optional(S.String), kind: S.optional(UpdateRequestKind), name: S.optional(S.String), phase: S.optional(UpdateRequestPhase), rules: S.optional(UpdateRequestRulesList), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/rulesets/{ruleset_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateRulesetForZoneRequest", }) as any as S.Schema; export type CreateRuleForAccountError = CloudflareOpError; /** Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default. */ export const createRuleForAccount: API.OperationMethod< CreateRuleForAccountRequest, CreateRuleResponse, CreateRuleForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRuleForAccountRequest, output: CreateRuleResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateRuleForZoneError = CloudflareOpError; /** Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default. */ export const createRuleForZone: API.OperationMethod< CreateRuleForZoneRequest, CreateRuleResponse, CreateRuleForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRuleForZoneRequest, output: CreateRuleResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateRulesetForAccountError = | PhaseNotEntitled | Forbidden | CloudflareOpError; /** Creates a ruleset. */ export const createRulesetForAccount: API.OperationMethod< CreateRulesetForAccountRequest, CreateRulesetResponse, CreateRulesetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRulesetForAccountRequest, output: CreateRulesetResponse, errors: [PhaseNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateRulesetForZoneError = | PhaseNotEntitled | Forbidden | CloudflareOpError; /** Creates a ruleset. */ export const createRulesetForZone: API.OperationMethod< CreateRulesetForZoneRequest, CreateRulesetResponse, CreateRulesetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRulesetForZoneRequest, output: CreateRulesetResponse, errors: [PhaseNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRuleForAccountError = CloudflareOpError; /** Deletes an existing rule from an account or zone ruleset. */ export const deleteRuleForAccount: API.OperationMethod< DeleteRuleForAccountRequest, DeleteRuleResponse, DeleteRuleForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRuleForAccountRequest, output: DeleteRuleResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRuleForZoneError = CloudflareOpError; /** Deletes an existing rule from an account or zone ruleset. */ export const deleteRuleForZone: API.OperationMethod< DeleteRuleForZoneRequest, DeleteRuleResponse, DeleteRuleForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRuleForZoneRequest, output: DeleteRuleResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRulesetForAccountError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Deletes all versions of an existing account or zone ruleset. */ export const deleteRulesetForAccount: API.OperationMethod< DeleteRulesetForAccountRequest, DeleteRulesetForAccountResponse, DeleteRulesetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRulesetForAccountRequest, output: DeleteRulesetForAccountResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRulesetForZoneError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Deletes all versions of an existing account or zone ruleset. */ export const deleteRulesetForZone: API.OperationMethod< DeleteRulesetForZoneRequest, DeleteRulesetForZoneResponse, DeleteRulesetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRulesetForZoneRequest, output: DeleteRulesetForZoneResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteVersionForAccountError = CloudflareOpError; /** Deletes an existing version of an account or zone ruleset. */ export const deleteVersionForAccount: API.OperationMethod< DeleteVersionForAccountRequest, DeleteVersionForAccountResponse, DeleteVersionForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteVersionForAccountRequest, output: DeleteVersionForAccountResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteVersionForZoneError = CloudflareOpError; /** Deletes an existing version of an account or zone ruleset. */ export const deleteVersionForZone: API.OperationMethod< DeleteVersionForZoneRequest, DeleteVersionForZoneResponse, DeleteVersionForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteVersionForZoneRequest, output: DeleteVersionForZoneResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPhasForAccountError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Fetches the latest version of the account or zone entry point ruleset for a given phase. */ export const getPhasForAccount: API.OperationMethod< GetPhasForAccountRequest, GetPhasResponse, GetPhasForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPhasForAccountRequest, output: GetPhasResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPhasForZoneError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Fetches the latest version of the account or zone entry point ruleset for a given phase. */ export const getPhasForZone: API.OperationMethod< GetPhasForZoneRequest, GetPhasResponse, GetPhasForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPhasForZoneRequest, output: GetPhasResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPhasVersionForAccountError = CloudflareOpError; /** Fetches a specific version of an account or zone entry point ruleset. */ export const getPhasVersionForAccount: API.OperationMethod< GetPhasVersionForAccountRequest, GetPhasVersionResponse, GetPhasVersionForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPhasVersionForAccountRequest, output: GetPhasVersionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPhasVersionForZoneError = CloudflareOpError; /** Fetches a specific version of an account or zone entry point ruleset. */ export const getPhasVersionForZone: API.OperationMethod< GetPhasVersionForZoneRequest, GetPhasVersionResponse, GetPhasVersionForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPhasVersionForZoneRequest, output: GetPhasVersionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetRulesetForAccountError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Fetches the latest version of an account or zone ruleset. */ export const getRulesetForAccount: API.OperationMethod< GetRulesetForAccountRequest, GetRulesetResponse, GetRulesetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetRulesetForAccountRequest, output: GetRulesetResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetRulesetForZoneError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Fetches the latest version of an account or zone ruleset. */ export const getRulesetForZone: API.OperationMethod< GetRulesetForZoneRequest, GetRulesetResponse, GetRulesetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetRulesetForZoneRequest, output: GetRulesetResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetVersionForAccountError = CloudflareOpError; /** Fetches a specific version of an account or zone ruleset. */ export const getVersionForAccount: API.OperationMethod< GetVersionForAccountRequest, GetVersionResponse, GetVersionForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetVersionForAccountRequest, output: GetVersionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetVersionForZoneError = CloudflareOpError; /** Fetches a specific version of an account or zone ruleset. */ export const getVersionForZone: API.OperationMethod< GetVersionForZoneRequest, GetVersionResponse, GetVersionForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetVersionForZoneRequest, output: GetVersionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListPhasVersionsForAccountError = CloudflareOpError; /** Fetches the versions of an account or zone entry point ruleset. */ export const listPhasVersionsForAccount: API.PaginatedOperationMethod< ListPhasVersionsForAccountRequest, ListPhasVersionsResponse, ListPhasVersionsForAccountError, CloudflareOpContext, PhasesVersionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPhasVersionsForAccountRequest, output: ListPhasVersionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListPhasVersionsForZoneError = CloudflareOpError; /** Fetches the versions of an account or zone entry point ruleset. */ export const listPhasVersionsForZone: API.PaginatedOperationMethod< ListPhasVersionsForZoneRequest, ListPhasVersionsResponse, ListPhasVersionsForZoneError, CloudflareOpContext, PhasesVersionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPhasVersionsForZoneRequest, output: ListPhasVersionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListRulesetsForAccountError = CloudflareOpError; /** Fetches all rulesets. */ export const listRulesetsForAccount: API.PaginatedOperationMethod< ListRulesetsForAccountRequest, ListRulesetsResponse, ListRulesetsForAccountError, CloudflareOpContext, ListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListRulesetsForAccountRequest, output: ListRulesetsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "cursor", inputToken: "cursor", outputToken: "resultInfo.cursor", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListRulesetsForZoneError = CloudflareOpError; /** Fetches all rulesets. */ export const listRulesetsForZone: API.PaginatedOperationMethod< ListRulesetsForZoneRequest, ListRulesetsResponse, ListRulesetsForZoneError, CloudflareOpContext, ListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListRulesetsForZoneRequest, output: ListRulesetsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "cursor", inputToken: "cursor", outputToken: "resultInfo.cursor", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListVersionsForAccountError = CloudflareOpError; /** Fetches the versions of an account or zone ruleset. */ export const listVersionsForAccount: API.PaginatedOperationMethod< ListVersionsForAccountRequest, ListVersionsResponse, ListVersionsForAccountError, CloudflareOpContext, VersionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListVersionsForAccountRequest, output: ListVersionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListVersionsForZoneError = CloudflareOpError; /** Fetches the versions of an account or zone ruleset. */ export const listVersionsForZone: API.PaginatedOperationMethod< ListVersionsForZoneRequest, ListVersionsResponse, ListVersionsForZoneError, CloudflareOpContext, VersionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListVersionsForZoneRequest, output: ListVersionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchRuleForAccountError = CloudflareOpError; /** Updates an existing rule in an account or zone ruleset. */ export const patchRuleForAccount: API.OperationMethod< PatchRuleForAccountRequest, PatchRuleResponse, PatchRuleForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchRuleForAccountRequest, output: PatchRuleResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchRuleForZoneError = CloudflareOpError; /** Updates an existing rule in an account or zone ruleset. */ export const patchRuleForZone: API.OperationMethod< PatchRuleForZoneRequest, PatchRuleResponse, PatchRuleForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchRuleForZoneRequest, output: PatchRuleResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutPhasForAccountError = | RulesetNotFound | PhaseNotEntitled | Forbidden | CloudflareOpError; /** Updates an account or zone entry point ruleset, creating a new version. */ export const putPhasForAccount: API.OperationMethod< PutPhasForAccountRequest, PutPhasResponse, PutPhasForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutPhasForAccountRequest, output: PutPhasResponse, errors: [ RulesetNotFound, PhaseNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutPhasForZoneError = | RulesetNotFound | PhaseNotEntitled | Forbidden | CloudflareOpError; /** Updates an account or zone entry point ruleset, creating a new version. */ export const putPhasForZone: API.OperationMethod< PutPhasForZoneRequest, PutPhasResponse, PutPhasForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutPhasForZoneRequest, output: PutPhasResponse, errors: [ RulesetNotFound, PhaseNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateRulesetForAccountError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Updates an account or zone ruleset, creating a new version. */ export const updateRulesetForAccount: API.OperationMethod< UpdateRulesetForAccountRequest, UpdateRulesetResponse, UpdateRulesetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateRulesetForAccountRequest, output: UpdateRulesetResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateRulesetForZoneError = | RulesetNotFound | Forbidden | CloudflareOpError; /** Updates an account or zone ruleset, creating a new version. */ export const updateRulesetForZone: API.OperationMethod< UpdateRulesetForZoneRequest, UpdateRulesetResponse, UpdateRulesetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateRulesetForZoneRequest, output: UpdateRulesetResponse, errors: [RulesetNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));