// 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> = { burstSensitivity: "burst_sensitivity", createdOn: "created_on", documentationUrl: "documentation_url", mitigationType: "mitigation_type", modifiedOn: "modified_on", perPage: "per_page", rateSensitivity: "rate_sensitivity", resultInfo: "result_info", totalCount: "total_count", }; export class AdvancedTcpProtectionNotEntitled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "AdvancedTcpProtectionNotEntitled", { code: S.Number, message: S.String, }, ), [{ code: 8888 }], ) {} export class AllowlistEntryNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "AllowlistEntryNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class SynProtectionFilterNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "SynProtectionFilterNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class SynProtectionRuleNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "SynProtectionRuleNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class TcpFlowProtectionFilterNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TcpFlowProtectionFilterNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class TcpFlowProtectionRuleNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TcpFlowProtectionRuleNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export interface AdvancedTcpProtectionPrefixesBulkCreateRequestBodyItem { /** A comment describing the prefix. */ comment: string; /** Whether to exclude the prefix from protection. */ excluded: boolean; /** The prefix to add in CIDR format. */ prefix: string; } export const AdvancedTcpProtectionPrefixesBulkCreateRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ comment: S.String, excluded: S.Boolean, prefix: S.String, }), ).annotate({ identifier: "AdvancedTcpProtectionPrefixesBulkCreateRequestBodyItem", }) as any as S.Schema; export type AdvancedTcpProtectionPrefixesBulkCreateRequestBodyList = Array; export const AdvancedTcpProtectionPrefixesBulkCreateRequestBodyList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionPrefixesBulkCreateRequestBodyItem, ) as any as S.Schema; export interface BulkCreateAdvancedTcpProtectionPrefixesRequest { /** Identifier. */ accountId: string; body: AdvancedTcpProtectionPrefixesBulkCreateRequestBodyList; } export const BulkCreateAdvancedTcpProtectionPrefixesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), body: AdvancedTcpProtectionPrefixesBulkCreateRequestBodyList.pipe( T.HttpBody(), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes/bulk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateAdvancedTcpProtectionPrefixesRequest", }) as any as S.Schema; export interface AdvancedTcpProtectionPrefixesBulkCreateResultItem { /** The unique ID of the prefix. */ id: string; /** A comment describing the prefix. */ comment: string; /** The creation timestamp of the prefix. */ createdOn: string; /** Whether to exclude the prefix from protection. */ excluded: boolean; /** The last modification timestamp of the prefix. */ modifiedOn: string; /** The prefix in CIDR format. */ prefix: string; } export const AdvancedTcpProtectionPrefixesBulkCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), excluded: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }), ).annotate({ identifier: "AdvancedTcpProtectionPrefixesBulkCreateResultItem", }) as any as S.Schema; export type AdvancedTcpProtectionPrefixesBulkCreateResultList = Array; export const AdvancedTcpProtectionPrefixesBulkCreateResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionPrefixesBulkCreateResultItem, ) as any as S.Schema; export interface BulkCreateAdvancedTcpProtectionPrefixesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionPrefixesBulkCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkCreateAdvancedTcpProtectionPrefixesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionPrefixesBulkCreateResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateAdvancedTcpProtectionPrefixesResponse", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionAllowlistsRequest { /** Identifier. */ accountId: string; } export const BulkDeleteAdvancedTcpProtectionAllowlistsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionAllowlistsRequest", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionAllowlistsResponse {} export const BulkDeleteAdvancedTcpProtectionAllowlistsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionAllowlistsResponse", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionPrefixesRequest { /** Identifier. */ accountId: string; } export const BulkDeleteAdvancedTcpProtectionPrefixesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionPrefixesRequest", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionPrefixesResponse {} export const BulkDeleteAdvancedTcpProtectionPrefixesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionPrefixesResponse", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest { /** Identifier. */ accountId: string; } export const BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse {} export const BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest { /** Identifier. */ accountId: string; } export const BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse {} export const BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest { /** Identifier. */ accountId: string; } export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse {} export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest { /** Identifier. */ accountId: string; } export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest", }) as any as S.Schema; export interface BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse {} export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse", }) as any as S.Schema; export interface CreateAdvancedTcpProtectionAllowlistRequest { /** Identifier. */ accountId: string; /** An comment describing the allowlist prefix. */ comment: string; /** Whether to enable the allowlist prefix into effect. */ enabled: boolean; /** The allowlist prefix to add in CIDR format. */ prefix: string; } export const CreateAdvancedTcpProtectionAllowlistRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), comment: S.String, enabled: S.Boolean, prefix: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionAllowlistRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAdvancedTcpProtectionAllowlistResponse { /** The unique ID of the allowlist prefix. */ id: string; /** An optional comment describing the allowlist prefix. */ comment: string; /** The creation timestamp of the allowlist prefix. */ createdOn: string; /** Whether to enable the allowlist prefix into effect. Defaults to false. */ enabled: boolean; /** The last modification timestamp of the allowlist prefix. */ modifiedOn: string; /** The allowlist prefix in CIDR format. */ prefix: string; } export const CreateAdvancedTcpProtectionAllowlistResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), enabled: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionAllowlistResponse", }) as any as S.Schema; export interface CreateAdvancedTcpProtectionPrefixRequest { /** Identifier. */ accountId: string; /** A comment describing the prefix. */ comment: string; /** Whether to exclude the prefix from protection. */ excluded: boolean; /** The prefix to add in CIDR format. */ prefix: string; } export const CreateAdvancedTcpProtectionPrefixRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), comment: S.String, excluded: S.Boolean, prefix: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionPrefixRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAdvancedTcpProtectionPrefixResponse { /** The unique ID of the prefix. */ id: string; /** A comment describing the prefix. */ comment: string; /** The creation timestamp of the prefix. */ createdOn: string; /** Whether to exclude the prefix from protection. */ excluded: boolean; /** The last modification timestamp of the prefix. */ modifiedOn: string; /** The prefix in CIDR format. */ prefix: string; } export const CreateAdvancedTcpProtectionPrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), excluded: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionPrefixResponse", }) as any as S.Schema; export interface CreateAdvancedTcpProtectionSynProtectionFilterRequest { /** Identifier. */ accountId: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; } export const CreateAdvancedTcpProtectionSynProtectionFilterRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), expression: S.String, mode: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionSynProtectionFilterRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAdvancedTcpProtectionSynProtectionFilterResponse { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const CreateAdvancedTcpProtectionSynProtectionFilterResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionSynProtectionFilterResponse", }) as any as S.Schema; export interface CreateAdvancedTcpProtectionSynProtectionRuleRequest { /** Identifier. */ accountId: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; /** The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'. */ mitigationType?: string; } export const CreateAdvancedTcpProtectionSynProtectionRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), mode: S.String, name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, mitigationType: S.optional(S.String.pipe(T.Body("mitigation_type"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionSynProtectionRuleRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAdvancedTcpProtectionSynProtectionRuleResponse { /** The unique ID of the SYN Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the SYN Protection rule. */ createdOn: string; /** The type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'. */ mitigationType: string; /** The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the SYN Protection rule. */ modifiedOn: string; /** The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const CreateAdvancedTcpProtectionSynProtectionRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mitigationType: S.String.pipe(T.Body("mitigation_type")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionSynProtectionRuleResponse", }) as any as S.Schema; export interface CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest { /** Identifier. */ accountId: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; } export const CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), expression: S.String, mode: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse", }) as any as S.Schema; export interface CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest { /** Identifier. */ accountId: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the TCP Flow Protection rule. */ scope: string; } export const CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), mode: S.String, name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse { /** The unique ID of the TCP Flow Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the TCP Flow Protection rule. */ createdOn: string; /** The mode for TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the TCP Flow Protection rule. */ modifiedOn: string; /** The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the TCP Flow Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionAllowlistItemRequest { /** Identifier. */ accountId: string; /** UUID. */ prefixId: string; } export const DeleteAdvancedTcpProtectionAllowlistItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionAllowlistItemRequest", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionAllowlistItemResponse {} export const DeleteAdvancedTcpProtectionAllowlistItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionAllowlistItemResponse", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionPrefixItemRequest { /** Identifier. */ accountId: string; /** UUID. */ prefixId: string; } export const DeleteAdvancedTcpProtectionPrefixItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionPrefixItemRequest", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionPrefixItemResponse {} export const DeleteAdvancedTcpProtectionPrefixItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionPrefixItemResponse", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest { /** Identifier. */ accountId: string; /** UUID. */ filterId: string; } export const DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), filterId: S.String.pipe(T.Label("filter_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/{filter_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse {} export const DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest { /** Identifier. */ accountId: string; /** UUID. */ ruleId: string; } export const DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse {} export const DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest { /** Identifier. */ accountId: string; /** UUID. */ filterId: string; } export const DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), filterId: S.String.pipe(T.Label("filter_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/{filter_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse {} export const DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest { /** Identifier. */ accountId: string; /** UUID. */ ruleId: string; } export const DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest", }) as any as S.Schema; export interface DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse {} export const DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionAllowlistItemRequest { /** Identifier. */ accountId: string; /** UUID. */ prefixId: string; } export const GetAdvancedTcpProtectionAllowlistItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionAllowlistItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionAllowlistItemResponse { /** The unique ID of the allowlist prefix. */ id: string; /** An optional comment describing the allowlist prefix. */ comment: string; /** The creation timestamp of the allowlist prefix. */ createdOn: string; /** Whether to enable the allowlist prefix into effect. Defaults to false. */ enabled: boolean; /** The last modification timestamp of the allowlist prefix. */ modifiedOn: string; /** The allowlist prefix in CIDR format. */ prefix: string; } export const GetAdvancedTcpProtectionAllowlistItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), enabled: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionAllowlistItemResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionPrefixItemRequest { /** Identifier. */ accountId: string; /** UUID. */ prefixId: string; } export const GetAdvancedTcpProtectionPrefixItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionPrefixItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionPrefixItemResponse { /** The unique ID of the prefix. */ id: string; /** A comment describing the prefix. */ comment: string; /** The creation timestamp of the prefix. */ createdOn: string; /** Whether to exclude the prefix from protection. */ excluded: boolean; /** The last modification timestamp of the prefix. */ modifiedOn: string; /** The prefix in CIDR format. */ prefix: string; } export const GetAdvancedTcpProtectionPrefixItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), excluded: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionPrefixItemResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionStatusRequest { /** Identifier. */ accountId: string; } export const GetAdvancedTcpProtectionStatusRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionStatusRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionStatusResponse { enabled: boolean; } export const GetAdvancedTcpProtectionStatusResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ enabled: S.Boolean, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionStatusResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionSynProtectionFilterItemRequest { /** Identifier. */ accountId: string; /** UUID. */ filterId: string; } export const GetAdvancedTcpProtectionSynProtectionFilterItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), filterId: S.String.pipe(T.Label("filter_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/{filter_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionSynProtectionFilterItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionSynProtectionFilterItemResponse { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const GetAdvancedTcpProtectionSynProtectionFilterItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionSynProtectionFilterItemResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionSynProtectionRuleItemRequest { /** Identifier. */ accountId: string; /** UUID. */ ruleId: string; } export const GetAdvancedTcpProtectionSynProtectionRuleItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionSynProtectionRuleItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionSynProtectionRuleItemResponse { /** The unique ID of the SYN Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the SYN Protection rule. */ createdOn: string; /** The type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'. */ mitigationType: string; /** The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the SYN Protection rule. */ modifiedOn: string; /** The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const GetAdvancedTcpProtectionSynProtectionRuleItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mitigationType: S.String.pipe(T.Body("mitigation_type")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionSynProtectionRuleItemResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest { /** Identifier. */ accountId: string; /** UUID. */ filterId: string; } export const GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), filterId: S.String.pipe(T.Label("filter_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/{filter_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse", }) as any as S.Schema; export interface GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest { /** Identifier. */ accountId: string; /** UUID. */ ruleId: string; } export const GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse { /** The unique ID of the TCP Flow Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the TCP Flow Protection rule. */ createdOn: string; /** The mode for TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the TCP Flow Protection rule. */ modifiedOn: string; /** The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the TCP Flow Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse", }) as any as S.Schema; export interface ListAdvancedTcpProtectionAllowlistsRequest { /** Identifier. */ accountId: string; /** The direction of ordering (ASC or DESC). Defaults to 'ASC'. */ direction?: string; /** The field to order by. Defaults to 'prefix'. */ order?: string; /** The page number for pagination. Defaults to 1. */ page?: number; /** The number of items per page. Must be between 10 and 1000. Defaults to 25. */ perPage?: number; } export const ListAdvancedTcpProtectionAllowlistsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional(S.String.pipe(T.Query())), order: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionAllowlistsRequest", }) as any as S.Schema; export interface AdvancedTcpProtectionAllowlistListResultItem { /** The unique ID of the allowlist prefix. */ id: string; /** An optional comment describing the allowlist prefix. */ comment: string; /** The creation timestamp of the allowlist prefix. */ createdOn: string; /** Whether to enable the allowlist prefix into effect. Defaults to false. */ enabled: boolean; /** The last modification timestamp of the allowlist prefix. */ modifiedOn: string; /** The allowlist prefix in CIDR format. */ prefix: string; } export const AdvancedTcpProtectionAllowlistListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), enabled: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }), ).annotate({ identifier: "AdvancedTcpProtectionAllowlistListResultItem", }) as any as S.Schema; export type AdvancedTcpProtectionAllowlistListResultList = Array; export const AdvancedTcpProtectionAllowlistListResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionAllowlistListResultItem, ) as any as S.Schema; export interface ListAdvancedTcpProtectionAllowlistsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionAllowlistListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAdvancedTcpProtectionAllowlistsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionAllowlistListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionAllowlistsResponse", }) as any as S.Schema; export interface ListAdvancedTcpProtectionPrefixesRequest { /** Identifier. */ accountId: string; /** The direction of ordering (ASC or DESC). Defaults to 'ASC'. */ direction?: string; /** The field to order by. Defaults to 'prefix'. */ order?: string; /** The page number for pagination. Defaults to 1. */ page?: number; /** The number of items per page. Must be between 10 and 1000. Defaults to 25. */ perPage?: number; } export const ListAdvancedTcpProtectionPrefixesRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional(S.String.pipe(T.Query())), order: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionPrefixesRequest", }) as any as S.Schema; export type AdvancedTcpProtectionPrefixesListResultItem = AdvancedTcpProtectionPrefixesBulkCreateResultItem; export const AdvancedTcpProtectionPrefixesListResultItem = AdvancedTcpProtectionPrefixesBulkCreateResultItem; export type AdvancedTcpProtectionPrefixesListResultList = Array; export const AdvancedTcpProtectionPrefixesListResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionPrefixesBulkCreateResultItem, ) as any as S.Schema; export interface ListAdvancedTcpProtectionPrefixesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionPrefixesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAdvancedTcpProtectionPrefixesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionPrefixesListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionPrefixesResponse", }) as any as S.Schema; export interface ListAdvancedTcpProtectionSynProtectionFiltersRequest { /** Identifier. */ accountId: string; /** The direction of ordering (ASC or DESC). Defaults to 'ASC'. */ direction?: string; /** The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'. */ mode?: string; /** The field to order by. Defaults to 'prefix'. */ order?: string; /** The page number for pagination. Defaults to 1. */ page?: number; /** The number of items per page. Must be between 10 and 1000. Defaults to 25. */ perPage?: number; } export const ListAdvancedTcpProtectionSynProtectionFiltersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional(S.String.pipe(T.Query())), mode: S.optional(S.String.pipe(T.Query())), order: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionSynProtectionFiltersRequest", }) as any as S.Schema; export interface AdvancedTcpProtectionSynProtectionFiltersListResultItem { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const AdvancedTcpProtectionSynProtectionFiltersListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }), ).annotate({ identifier: "AdvancedTcpProtectionSynProtectionFiltersListResultItem", }) as any as S.Schema; export type AdvancedTcpProtectionSynProtectionFiltersListResultList = Array; export const AdvancedTcpProtectionSynProtectionFiltersListResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionSynProtectionFiltersListResultItem, ) as any as S.Schema; export interface ListAdvancedTcpProtectionSynProtectionFiltersResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionSynProtectionFiltersListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAdvancedTcpProtectionSynProtectionFiltersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionSynProtectionFiltersListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionSynProtectionFiltersResponse", }) as any as S.Schema; export interface ListAdvancedTcpProtectionSynProtectionRulesRequest { /** Identifier. */ accountId: string; /** The direction of ordering (ASC or DESC). Defaults to 'ASC'. */ direction?: string; /** The field to order by. Defaults to 'prefix'. */ order?: string; /** The page number for pagination. Defaults to 1. */ page?: number; /** The number of items per page. Must be between 10 and 1000. Defaults to 25. */ perPage?: number; } export const ListAdvancedTcpProtectionSynProtectionRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional(S.String.pipe(T.Query())), order: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionSynProtectionRulesRequest", }) as any as S.Schema; export interface AdvancedTcpProtectionSynProtectionRulesListResultItem { /** The unique ID of the SYN Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the SYN Protection rule. */ createdOn: string; /** The type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'. */ mitigationType: string; /** The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the SYN Protection rule. */ modifiedOn: string; /** The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const AdvancedTcpProtectionSynProtectionRulesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mitigationType: S.String.pipe(T.Body("mitigation_type")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }), ).annotate({ identifier: "AdvancedTcpProtectionSynProtectionRulesListResultItem", }) as any as S.Schema; export type AdvancedTcpProtectionSynProtectionRulesListResultList = Array; export const AdvancedTcpProtectionSynProtectionRulesListResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionSynProtectionRulesListResultItem, ) as any as S.Schema; export interface ListAdvancedTcpProtectionSynProtectionRulesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionSynProtectionRulesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAdvancedTcpProtectionSynProtectionRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionSynProtectionRulesListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionSynProtectionRulesResponse", }) as any as S.Schema; export interface ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest { /** Identifier. */ accountId: string; /** The direction of ordering (ASC or DESC). Defaults to 'ASC'. */ direction?: string; /** The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'. */ mode?: string; /** The field to order by. Defaults to 'prefix'. */ order?: string; /** The page number for pagination. Defaults to 1. */ page?: number; /** The number of items per page. Must be between 10 and 1000. Defaults to 25. */ perPage?: number; } export const ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional(S.String.pipe(T.Query())), mode: S.optional(S.String.pipe(T.Query())), order: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest", }) as any as S.Schema; export type AdvancedTcpProtectionTcpFlowProtectionFiltersListResultItem = AdvancedTcpProtectionSynProtectionFiltersListResultItem; export const AdvancedTcpProtectionTcpFlowProtectionFiltersListResultItem = AdvancedTcpProtectionSynProtectionFiltersListResultItem; export type AdvancedTcpProtectionTcpFlowProtectionFiltersListResultList = Array; export const AdvancedTcpProtectionTcpFlowProtectionFiltersListResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionSynProtectionFiltersListResultItem, ) as any as S.Schema; export interface ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionTcpFlowProtectionFiltersListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionTcpFlowProtectionFiltersListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse", }) as any as S.Schema; export interface ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest { /** Identifier. */ accountId: string; /** The direction of ordering (ASC or DESC). Defaults to 'ASC'. */ direction?: string; /** The field to order by. Defaults to 'prefix'. */ order?: string; /** The page number for pagination. Defaults to 1. */ page?: number; /** The number of items per page. Must be between 10 and 1000. Defaults to 25. */ perPage?: number; } export const ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional(S.String.pipe(T.Query())), order: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest", }) as any as S.Schema; export interface AdvancedTcpProtectionTcpFlowProtectionRulesListResultItem { /** The unique ID of the TCP Flow Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the TCP Flow Protection rule. */ createdOn: string; /** The mode for TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the TCP Flow Protection rule. */ modifiedOn: string; /** The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the TCP Flow Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const AdvancedTcpProtectionTcpFlowProtectionRulesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }), ).annotate({ identifier: "AdvancedTcpProtectionTcpFlowProtectionRulesListResultItem", }) as any as S.Schema; export type AdvancedTcpProtectionTcpFlowProtectionRulesListResultList = Array; export const AdvancedTcpProtectionTcpFlowProtectionRulesListResultList = /*@__PURE__*/ S.Array( AdvancedTcpProtectionTcpFlowProtectionRulesListResultItem, ) as any as S.Schema; export interface ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AdvancedTcpProtectionTcpFlowProtectionRulesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AdvancedTcpProtectionTcpFlowProtectionRulesListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionAllowlistItemRequest { /** Identifier. */ accountId: string; /** UUID. */ prefixId: string; /** A comment describing the allowlist prefix. Optional. */ comment?: string; /** Whether to enable the allowlist prefix into effect. Optional. */ enabled?: boolean; } export const PatchAdvancedTcpProtectionAllowlistItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), comment: S.optional(S.String), enabled: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionAllowlistItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionAllowlistItemResponse { /** The unique ID of the allowlist prefix. */ id: string; /** An optional comment describing the allowlist prefix. */ comment: string; /** The creation timestamp of the allowlist prefix. */ createdOn: string; /** Whether to enable the allowlist prefix into effect. Defaults to false. */ enabled: boolean; /** The last modification timestamp of the allowlist prefix. */ modifiedOn: string; /** The allowlist prefix in CIDR format. */ prefix: string; } export const PatchAdvancedTcpProtectionAllowlistItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), enabled: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionAllowlistItemResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionPrefixItemRequest { /** Identifier. */ accountId: string; /** UUID. */ prefixId: string; /** A new comment for the prefix. Optional. */ comment?: string; /** Whether to exclude the prefix from protection. Optional. */ excluded?: boolean; } export const PatchAdvancedTcpProtectionPrefixItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), comment: S.optional(S.String), excluded: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionPrefixItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionPrefixItemResponse { /** The unique ID of the prefix. */ id: string; /** A comment describing the prefix. */ comment: string; /** The creation timestamp of the prefix. */ createdOn: string; /** Whether to exclude the prefix from protection. */ excluded: boolean; /** The last modification timestamp of the prefix. */ modifiedOn: string; /** The prefix in CIDR format. */ prefix: string; } export const PatchAdvancedTcpProtectionPrefixItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, comment: S.String, createdOn: S.String.pipe(T.Body("created_on")), excluded: S.Boolean, modifiedOn: S.String.pipe(T.Body("modified_on")), prefix: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionPrefixItemResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionStatusRequest { /** Identifier. */ accountId: string; /** Enables or disables protection. */ enabled: boolean; } export const PatchAdvancedTcpProtectionStatusRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), enabled: S.Boolean, }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionStatusRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionStatusResponse { enabled: boolean; } export const PatchAdvancedTcpProtectionStatusResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ enabled: S.Boolean, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionStatusResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionSynProtectionFilterItemRequest { /** Identifier. */ accountId: string; /** UUID. */ filterId: string; /** The new filter expression. Optional. */ expression?: string; /** The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode?: string; } export const PatchAdvancedTcpProtectionSynProtectionFilterItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), filterId: S.String.pipe(T.Label("filter_id")), expression: S.optional(S.String), mode: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/{filter_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionSynProtectionFilterItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionSynProtectionFilterItemResponse { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const PatchAdvancedTcpProtectionSynProtectionFilterItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionSynProtectionFilterItemResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionSynProtectionRuleItemRequest { /** Identifier. */ accountId: string; /** UUID. */ ruleId: string; /** The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'. */ burstSensitivity?: string; /** The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'. */ mitigationType?: string; /** The new mode for SYN Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode?: string; /** The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'. */ rateSensitivity?: string; } export const PatchAdvancedTcpProtectionSynProtectionRuleItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ruleId: S.String.pipe(T.Label("rule_id")), burstSensitivity: S.optional(S.String.pipe(T.Body("burst_sensitivity"))), mitigationType: S.optional(S.String.pipe(T.Body("mitigation_type"))), mode: S.optional(S.String), rateSensitivity: S.optional(S.String.pipe(T.Body("rate_sensitivity"))), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionSynProtectionRuleItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionSynProtectionRuleItemResponse { /** The unique ID of the SYN Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the SYN Protection rule. */ createdOn: string; /** The type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'. */ mitigationType: string; /** The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the SYN Protection rule. */ modifiedOn: string; /** The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const PatchAdvancedTcpProtectionSynProtectionRuleItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mitigationType: S.String.pipe(T.Body("mitigation_type")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionSynProtectionRuleItemResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest { /** Identifier. */ accountId: string; /** UUID. */ filterId: string; /** The new filter expression. Optional. */ expression?: string; /** The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode?: string; } export const PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), filterId: S.String.pipe(T.Label("filter_id")), expression: S.optional(S.String), mode: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/{filter_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse { /** The unique ID of the expression filter. */ id: string; /** The creation timestamp of the expression filter. */ createdOn: string; /** The filter expression. */ expression: string; /** The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the expression filter. */ modifiedOn: string; } export const PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), expression: S.String, mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse", }) as any as S.Schema; export interface PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest { /** Identifier. */ accountId: string; /** UUID. */ ruleId: string; /** The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'. */ burstSensitivity?: string; /** The new mode for TCP Flow Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode?: string; /** The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'. */ rateSensitivity?: string; } export const PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ruleId: S.String.pipe(T.Label("rule_id")), burstSensitivity: S.optional(S.String.pipe(T.Body("burst_sensitivity"))), mode: S.optional(S.String), rateSensitivity: S.optional(S.String.pipe(T.Body("rate_sensitivity"))), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse { /** The unique ID of the TCP Flow Protection rule. */ id: string; /** The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burstSensitivity: string; /** The creation timestamp of the TCP Flow Protection rule. */ createdOn: string; /** The mode for TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** The last modification timestamp of the TCP Flow Protection rule. */ modifiedOn: string; /** The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. */ name: string; /** The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rateSensitivity: string; /** The scope for the TCP Flow Protection rule. Must be one of 'global', 'region', or 'datacenter'. */ scope: string; } export const PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, burstSensitivity: S.String.pipe(T.Body("burst_sensitivity")), createdOn: S.String.pipe(T.Body("created_on")), mode: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, rateSensitivity: S.String.pipe(T.Body("rate_sensitivity")), scope: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse", }) as any as S.Schema; export type BulkCreateAdvancedTcpProtectionPrefixesError = CloudflareOpError; /** Create multiple prefixes for an account. */ export const bulkCreateAdvancedTcpProtectionPrefixes: API.PaginatedOperationMethod< BulkCreateAdvancedTcpProtectionPrefixesRequest, BulkCreateAdvancedTcpProtectionPrefixesResponse, BulkCreateAdvancedTcpProtectionPrefixesError, CloudflareOpContext, AdvancedTcpProtectionPrefixesBulkCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkCreateAdvancedTcpProtectionPrefixesRequest, output: BulkCreateAdvancedTcpProtectionPrefixesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkDeleteAdvancedTcpProtectionAllowlistsError = CloudflareOpError; /** Delete all allowlist prefixes for an account. */ export const bulkDeleteAdvancedTcpProtectionAllowlists: API.OperationMethod< BulkDeleteAdvancedTcpProtectionAllowlistsRequest, BulkDeleteAdvancedTcpProtectionAllowlistsResponse, BulkDeleteAdvancedTcpProtectionAllowlistsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteAdvancedTcpProtectionAllowlistsRequest, output: BulkDeleteAdvancedTcpProtectionAllowlistsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkDeleteAdvancedTcpProtectionPrefixesError = CloudflareOpError; /** Delete all prefixes for an account. */ export const bulkDeleteAdvancedTcpProtectionPrefixes: API.OperationMethod< BulkDeleteAdvancedTcpProtectionPrefixesRequest, BulkDeleteAdvancedTcpProtectionPrefixesResponse, BulkDeleteAdvancedTcpProtectionPrefixesError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteAdvancedTcpProtectionPrefixesRequest, output: BulkDeleteAdvancedTcpProtectionPrefixesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkDeleteAdvancedTcpProtectionSynProtectionFiltersError = CloudflareOpError; /** Delete all SYN Protection filters for an account. */ export const bulkDeleteAdvancedTcpProtectionSynProtectionFilters: API.OperationMethod< BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest, BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse, BulkDeleteAdvancedTcpProtectionSynProtectionFiltersError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest, output: BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkDeleteAdvancedTcpProtectionSynProtectionRulesError = CloudflareOpError; /** Delete all SYN Protection rules for an account. */ export const bulkDeleteAdvancedTcpProtectionSynProtectionRules: API.OperationMethod< BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest, BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse, BulkDeleteAdvancedTcpProtectionSynProtectionRulesError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest, output: BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersError = CloudflareOpError; /** Delete all TCP Flow Protection filters for an account. */ export const bulkDeleteAdvancedTcpProtectionTcpFlowProtectionFilters: API.OperationMethod< BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest, BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse, BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest, output: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesError = CloudflareOpError; /** Delete all TCP Flow Protection rules for an account. */ export const bulkDeleteAdvancedTcpProtectionTcpFlowProtectionRules: API.OperationMethod< BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest, BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse, BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest, output: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAdvancedTcpProtectionAllowlistError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Create an allowlist prefix for an account. */ export const createAdvancedTcpProtectionAllowlist: API.OperationMethod< CreateAdvancedTcpProtectionAllowlistRequest, CreateAdvancedTcpProtectionAllowlistResponse, CreateAdvancedTcpProtectionAllowlistError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAdvancedTcpProtectionAllowlistRequest, output: CreateAdvancedTcpProtectionAllowlistResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAdvancedTcpProtectionPrefixError = CloudflareOpError; /** Create a prefix for an account. */ export const createAdvancedTcpProtectionPrefix: API.OperationMethod< CreateAdvancedTcpProtectionPrefixRequest, CreateAdvancedTcpProtectionPrefixResponse, CreateAdvancedTcpProtectionPrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAdvancedTcpProtectionPrefixRequest, output: CreateAdvancedTcpProtectionPrefixResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAdvancedTcpProtectionSynProtectionFilterError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Create a SYN Protection filter for an account. */ export const createAdvancedTcpProtectionSynProtectionFilter: API.OperationMethod< CreateAdvancedTcpProtectionSynProtectionFilterRequest, CreateAdvancedTcpProtectionSynProtectionFilterResponse, CreateAdvancedTcpProtectionSynProtectionFilterError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAdvancedTcpProtectionSynProtectionFilterRequest, output: CreateAdvancedTcpProtectionSynProtectionFilterResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAdvancedTcpProtectionSynProtectionRuleError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Create a SYN Protection rule for an account. */ export const createAdvancedTcpProtectionSynProtectionRule: API.OperationMethod< CreateAdvancedTcpProtectionSynProtectionRuleRequest, CreateAdvancedTcpProtectionSynProtectionRuleResponse, CreateAdvancedTcpProtectionSynProtectionRuleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAdvancedTcpProtectionSynProtectionRuleRequest, output: CreateAdvancedTcpProtectionSynProtectionRuleResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAdvancedTcpProtectionTcpFlowProtectionFilterError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Create a TCP Flow Protection filter for an account. */ export const createAdvancedTcpProtectionTcpFlowProtectionFilter: API.OperationMethod< CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest, CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse, CreateAdvancedTcpProtectionTcpFlowProtectionFilterError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest, output: CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAdvancedTcpProtectionTcpFlowProtectionRuleError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Create a TCP Flow Protection rule for an account. */ export const createAdvancedTcpProtectionTcpFlowProtectionRule: API.OperationMethod< CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest, CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse, CreateAdvancedTcpProtectionTcpFlowProtectionRuleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest, output: CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAdvancedTcpProtectionAllowlistItemError = | AllowlistEntryNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Delete the allowlist prefix for an account given a UUID. */ export const deleteAdvancedTcpProtectionAllowlistItem: API.OperationMethod< DeleteAdvancedTcpProtectionAllowlistItemRequest, DeleteAdvancedTcpProtectionAllowlistItemResponse, DeleteAdvancedTcpProtectionAllowlistItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAdvancedTcpProtectionAllowlistItemRequest, output: DeleteAdvancedTcpProtectionAllowlistItemResponse, errors: [ AllowlistEntryNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAdvancedTcpProtectionPrefixItemError = CloudflareOpError; /** Delete the prefix for an account given a UUID. */ export const deleteAdvancedTcpProtectionPrefixItem: API.OperationMethod< DeleteAdvancedTcpProtectionPrefixItemRequest, DeleteAdvancedTcpProtectionPrefixItemResponse, DeleteAdvancedTcpProtectionPrefixItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAdvancedTcpProtectionPrefixItemRequest, output: DeleteAdvancedTcpProtectionPrefixItemResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAdvancedTcpProtectionSynProtectionFilterItemError = | SynProtectionFilterNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Delete a SYN Protection filter specified by the given UUID. */ export const deleteAdvancedTcpProtectionSynProtectionFilterItem: API.OperationMethod< DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest, DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse, DeleteAdvancedTcpProtectionSynProtectionFilterItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest, output: DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse, errors: [ SynProtectionFilterNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAdvancedTcpProtectionSynProtectionRuleItemError = | SynProtectionRuleNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Delete a SYN Protection rule specified by the given UUID. */ export const deleteAdvancedTcpProtectionSynProtectionRuleItem: API.OperationMethod< DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest, DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse, DeleteAdvancedTcpProtectionSynProtectionRuleItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest, output: DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse, errors: [ SynProtectionRuleNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemError = | TcpFlowProtectionFilterNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Delete a TCP Flow Protection filter specified by the given UUID. */ export const deleteAdvancedTcpProtectionTcpFlowProtectionFilterItem: API.OperationMethod< DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest, DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse, DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest, output: DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse, errors: [ TcpFlowProtectionFilterNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemError = | TcpFlowProtectionRuleNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Delete a TCP Flow Protection rule specified by the given UUID. */ export const deleteAdvancedTcpProtectionTcpFlowProtectionRuleItem: API.OperationMethod< DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest, DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse, DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest, output: DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse, errors: [ TcpFlowProtectionRuleNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionAllowlistItemError = | AllowlistEntryNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Get an allowlist prefix specified by the given UUID. */ export const getAdvancedTcpProtectionAllowlistItem: API.OperationMethod< GetAdvancedTcpProtectionAllowlistItemRequest, GetAdvancedTcpProtectionAllowlistItemResponse, GetAdvancedTcpProtectionAllowlistItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionAllowlistItemRequest, output: GetAdvancedTcpProtectionAllowlistItemResponse, errors: [ AllowlistEntryNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionPrefixItemError = CloudflareOpError; /** Get a prefix specified by the given UUID. */ export const getAdvancedTcpProtectionPrefixItem: API.OperationMethod< GetAdvancedTcpProtectionPrefixItemRequest, GetAdvancedTcpProtectionPrefixItemResponse, GetAdvancedTcpProtectionPrefixItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionPrefixItemRequest, output: GetAdvancedTcpProtectionPrefixItemResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionStatusError = CloudflareOpError; /** Get the protection status of the account. */ export const getAdvancedTcpProtectionStatus: API.OperationMethod< GetAdvancedTcpProtectionStatusRequest, GetAdvancedTcpProtectionStatusResponse, GetAdvancedTcpProtectionStatusError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionStatusRequest, output: GetAdvancedTcpProtectionStatusResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionSynProtectionFilterItemError = | SynProtectionFilterNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Get a SYN Protection filter specified by the given UUID. */ export const getAdvancedTcpProtectionSynProtectionFilterItem: API.OperationMethod< GetAdvancedTcpProtectionSynProtectionFilterItemRequest, GetAdvancedTcpProtectionSynProtectionFilterItemResponse, GetAdvancedTcpProtectionSynProtectionFilterItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionSynProtectionFilterItemRequest, output: GetAdvancedTcpProtectionSynProtectionFilterItemResponse, errors: [ SynProtectionFilterNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionSynProtectionRuleItemError = | SynProtectionRuleNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Get a SYN Protection rule specified by the given UUID. */ export const getAdvancedTcpProtectionSynProtectionRuleItem: API.OperationMethod< GetAdvancedTcpProtectionSynProtectionRuleItemRequest, GetAdvancedTcpProtectionSynProtectionRuleItemResponse, GetAdvancedTcpProtectionSynProtectionRuleItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionSynProtectionRuleItemRequest, output: GetAdvancedTcpProtectionSynProtectionRuleItemResponse, errors: [ SynProtectionRuleNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionTcpFlowProtectionFilterItemError = | TcpFlowProtectionFilterNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Get a TCP Flow Protection filter specified by the given UUID. */ export const getAdvancedTcpProtectionTcpFlowProtectionFilterItem: API.OperationMethod< GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest, GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse, GetAdvancedTcpProtectionTcpFlowProtectionFilterItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest, output: GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse, errors: [ TcpFlowProtectionFilterNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAdvancedTcpProtectionTcpFlowProtectionRuleItemError = | TcpFlowProtectionRuleNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Get a TCP Flow Protection rule specified by the given UUID. */ export const getAdvancedTcpProtectionTcpFlowProtectionRuleItem: API.OperationMethod< GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest, GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse, GetAdvancedTcpProtectionTcpFlowProtectionRuleItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest, output: GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse, errors: [ TcpFlowProtectionRuleNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListAdvancedTcpProtectionAllowlistsError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** List all allowlist prefixes for an account. */ export const listAdvancedTcpProtectionAllowlists: API.PaginatedOperationMethod< ListAdvancedTcpProtectionAllowlistsRequest, ListAdvancedTcpProtectionAllowlistsResponse, ListAdvancedTcpProtectionAllowlistsError, CloudflareOpContext, AdvancedTcpProtectionAllowlistListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAdvancedTcpProtectionAllowlistsRequest, output: ListAdvancedTcpProtectionAllowlistsResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListAdvancedTcpProtectionPrefixesError = CloudflareOpError; /** List all prefixes for an account. */ export const listAdvancedTcpProtectionPrefixes: API.PaginatedOperationMethod< ListAdvancedTcpProtectionPrefixesRequest, ListAdvancedTcpProtectionPrefixesResponse, ListAdvancedTcpProtectionPrefixesError, CloudflareOpContext, AdvancedTcpProtectionPrefixesBulkCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAdvancedTcpProtectionPrefixesRequest, output: ListAdvancedTcpProtectionPrefixesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListAdvancedTcpProtectionSynProtectionFiltersError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** List all SYN Protection filters for an account. */ export const listAdvancedTcpProtectionSynProtectionFilters: API.PaginatedOperationMethod< ListAdvancedTcpProtectionSynProtectionFiltersRequest, ListAdvancedTcpProtectionSynProtectionFiltersResponse, ListAdvancedTcpProtectionSynProtectionFiltersError, CloudflareOpContext, AdvancedTcpProtectionSynProtectionFiltersListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAdvancedTcpProtectionSynProtectionFiltersRequest, output: ListAdvancedTcpProtectionSynProtectionFiltersResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListAdvancedTcpProtectionSynProtectionRulesError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** List all SYN Protection rules for an account. */ export const listAdvancedTcpProtectionSynProtectionRules: API.PaginatedOperationMethod< ListAdvancedTcpProtectionSynProtectionRulesRequest, ListAdvancedTcpProtectionSynProtectionRulesResponse, ListAdvancedTcpProtectionSynProtectionRulesError, CloudflareOpContext, AdvancedTcpProtectionSynProtectionRulesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAdvancedTcpProtectionSynProtectionRulesRequest, output: ListAdvancedTcpProtectionSynProtectionRulesResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListAdvancedTcpProtectionTcpFlowProtectionFiltersError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** List all TCP Flow Protection filters for an account. */ export const listAdvancedTcpProtectionTcpFlowProtectionFilters: API.PaginatedOperationMethod< ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest, ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse, ListAdvancedTcpProtectionTcpFlowProtectionFiltersError, CloudflareOpContext, AdvancedTcpProtectionSynProtectionFiltersListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest, output: ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListAdvancedTcpProtectionTcpFlowProtectionRulesError = | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** List all TCP Flow Protection rules for an account. */ export const listAdvancedTcpProtectionTcpFlowProtectionRules: API.PaginatedOperationMethod< ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest, ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse, ListAdvancedTcpProtectionTcpFlowProtectionRulesError, CloudflareOpContext, AdvancedTcpProtectionTcpFlowProtectionRulesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest, output: ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse, errors: [ AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type PatchAdvancedTcpProtectionAllowlistItemError = | AllowlistEntryNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Update an allowlist prefix specified by the given UUID. */ export const patchAdvancedTcpProtectionAllowlistItem: API.OperationMethod< PatchAdvancedTcpProtectionAllowlistItemRequest, PatchAdvancedTcpProtectionAllowlistItemResponse, PatchAdvancedTcpProtectionAllowlistItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionAllowlistItemRequest, output: PatchAdvancedTcpProtectionAllowlistItemResponse, errors: [ AllowlistEntryNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAdvancedTcpProtectionPrefixItemError = CloudflareOpError; /** Update a prefix specified by the given UUID. */ export const patchAdvancedTcpProtectionPrefixItem: API.OperationMethod< PatchAdvancedTcpProtectionPrefixItemRequest, PatchAdvancedTcpProtectionPrefixItemResponse, PatchAdvancedTcpProtectionPrefixItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionPrefixItemRequest, output: PatchAdvancedTcpProtectionPrefixItemResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAdvancedTcpProtectionStatusError = CloudflareOpError; /** Update the protection status of the account. */ export const patchAdvancedTcpProtectionStatus: API.OperationMethod< PatchAdvancedTcpProtectionStatusRequest, PatchAdvancedTcpProtectionStatusResponse, PatchAdvancedTcpProtectionStatusError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionStatusRequest, output: PatchAdvancedTcpProtectionStatusResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAdvancedTcpProtectionSynProtectionFilterItemError = | SynProtectionFilterNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Update a SYN Protection filter specified by the given UUID. */ export const patchAdvancedTcpProtectionSynProtectionFilterItem: API.OperationMethod< PatchAdvancedTcpProtectionSynProtectionFilterItemRequest, PatchAdvancedTcpProtectionSynProtectionFilterItemResponse, PatchAdvancedTcpProtectionSynProtectionFilterItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionSynProtectionFilterItemRequest, output: PatchAdvancedTcpProtectionSynProtectionFilterItemResponse, errors: [ SynProtectionFilterNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAdvancedTcpProtectionSynProtectionRuleItemError = | SynProtectionRuleNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Update a SYN Protection rule specified by the given UUID. */ export const patchAdvancedTcpProtectionSynProtectionRuleItem: API.OperationMethod< PatchAdvancedTcpProtectionSynProtectionRuleItemRequest, PatchAdvancedTcpProtectionSynProtectionRuleItemResponse, PatchAdvancedTcpProtectionSynProtectionRuleItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionSynProtectionRuleItemRequest, output: PatchAdvancedTcpProtectionSynProtectionRuleItemResponse, errors: [ SynProtectionRuleNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemError = | TcpFlowProtectionFilterNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Update a TCP Flow Protection filter specified by the given UUID. */ export const patchAdvancedTcpProtectionTcpFlowProtectionFilterItem: API.OperationMethod< PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest, PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse, PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest, output: PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse, errors: [ TcpFlowProtectionFilterNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemError = | TcpFlowProtectionRuleNotFound | AdvancedTcpProtectionNotEntitled | Forbidden | CloudflareOpError; /** Update a TCP Flow Protection rule specified by the given UUID. */ export const patchAdvancedTcpProtectionTcpFlowProtectionRuleItem: API.OperationMethod< PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest, PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse, PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest, output: PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse, errors: [ TcpFlowProtectionRuleNotFound, AdvancedTcpProtectionNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, }));