// 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> = { accountAppId: "account_app_id", allowNullCipher: "allow_null_cipher", automaticReturnRouting: "automatic_return_routing", availableBytes: "available_bytes", availableInodes: "available_inodes", bgpState: "bgp_state", bgpStatus: "bgp_status", bondId: "bond_id", byteLimit: "byte_limit", cfSpeakerIp: "cf_speaker_ip", cfSpeakerPort: "cf_speaker_port", clientId: "client_id", cloudflareEndpoint: "cloudflare_endpoint", cloudflareGreEndpoint: "cloudflare_gre_endpoint", coloName: "colo_name", coloNames: "colo_names", coloRegions: "colo_regions", connectorId: "connector_id", countReclaimFailures: "count_reclaim_failures", countReclaimedPaths: "count_reclaimed_paths", countRecordFailed: "count_record_failed", countTransmitFailures: "count_transmit_failures", cpuCount: "cpu_count", cpuPressureTotalUs: "cpu_pressure_total_us", cpuPressure_10s: "cpu_pressure_10s", cpuPressure_300s: "cpu_pressure_300s", cpuPressure_60s: "cpu_pressure_60s", cpuTimeGuestMs: "cpu_time_guest_ms", cpuTimeGuestNiceMs: "cpu_time_guest_nice_ms", cpuTimeIdleMs: "cpu_time_idle_ms", cpuTimeIowaitMs: "cpu_time_iowait_ms", cpuTimeIrqMs: "cpu_time_irq_ms", cpuTimeNiceMs: "cpu_time_nice_ms", cpuTimeSoftirqMs: "cpu_time_softirq_ms", cpuTimeStealMs: "cpu_time_steal_ms", cpuTimeSystemMs: "cpu_time_system_ms", cpuTimeUserMs: "cpu_time_user_ms", createdOn: "created_on", criticalCelcius: "critical_celcius", currentCelcius: "current_celcius", customRemoteIdentities: "custom_remote_identities", customerAsn: "customer_asn", customerEndpoint: "customer_endpoint", customerGreEndpoint: "customer_gre_endpoint", customerSpeakerIp: "customer_speaker_ip", customerSpeakerPort: "customer_speaker_port", deletedGreTunnel: "deleted_gre_tunnel", deletedIpsecTunnel: "deleted_ipsec_tunnel", deletedRoute: "deleted_route", deletedRoutes: "deleted_routes", destinationAddress: "destination_address", destinationConf: "destination_conf", destinationPort: "destination_port", dhcpLeases: "dhcp_leases", dhcpOptions: "dhcp_options", dhcpPoolEnd: "dhcp_pool_end", dhcpPoolStart: "dhcp_pool_start", dhcpRelay: "dhcp_relay", dhcpServer: "dhcp_server", discardsMerged: "discards_merged", dnsServer: "dns_server", dnsServers: "dns_servers", errorMessage: "error_message", expiryTime: "expiry_time", exportFilterId: "export_filter_id", extraPrefixes: "extra_prefixes", fileSystem: "file_system", filterV1: "filter_v1", forwardLocally: "forward_locally", fqdnId: "fqdn_id", gatewayAddress: "gateway_address", greInterconnect: "gre_interconnect", greTunnel: "gre_tunnel", greTunnels: "gre_tunnels", haLink: "ha_link", haMode: "ha_mode", haState: "ha_state", haValue: "ha_value", healthCheck: "health_check", healthCheckRate: "health_check_rate", healthState: "health_state", healthValue: "health_value", importFilterId: "import_filter_id", inProgress: "in_progress", interfaceAddress: "interface_address", interfaceAddress6: "interface_address6", interfaceName: "interface_name", interruptWindowDaysOfWeek: "interrupt_window_days_of_week", interruptWindowDurationHours: "interrupt_window_duration_hours", interruptWindowEmbargoDates: "interrupt_window_embargo_dates", interruptWindowHourOfDay: "interrupt_window_hour_of_day", ioPressureFullTotalUs: "io_pressure_full_total_us", ioPressureFull_10s: "io_pressure_full_10s", ioPressureFull_300s: "io_pressure_full_300s", ioPressureFull_60s: "io_pressure_full_60s", ioPressureSomeTotalUs: "io_pressure_some_total_us", ioPressureSome_10s: "io_pressure_some_10s", ioPressureSome_300s: "io_pressure_some_300s", ioPressureSome_60s: "io_pressure_some_60s", ipAddress: "ip_address", ipAddresses: "ip_addresses", ipSubnets: "ip_subnets", ipsecTunnel: "ipsec_tunnel", ipsecTunnelId: "ipsec_tunnel_id", ipsecTunnels: "ipsec_tunnels", isBreakout: "is_breakout", isPrioritized: "is_prioritized", isReadOnly: "is_read_only", isRemovable: "is_removable", kernelBtime: "kernel_btime", kernelCtxt: "kernel_ctxt", kernelProcesses: "kernel_processes", kernelProcessesBlocked: "kernel_processes_blocked", kernelProcessesRunning: "kernel_processes_running", lanId: "lan_id", lanName: "lan_name", lastGeneratedOn: "last_generated_on", lastHeartbeat: "last_heartbeat", lastSeenVersion: "last_seen_version", lastUpdated: "last_updated", licenseKey: "license_key", loadAverageCur: "load_average_cur", loadAverageMax: "load_average_max", loadAverage_15m: "load_average_15m", loadAverage_1m: "load_average_1m", loadAverage_5m: "load_average_5m", macAddress: "mac_address", managedAppId: "managed_app_id", managedBy: "managed_by", maxCelcius: "max_celcius", md5Key: "md5_key", memoryActiveBytes: "memory_active_bytes", memoryAnonHugepagesBytes: "memory_anon_hugepages_bytes", memoryAnonPagesBytes: "memory_anon_pages_bytes", memoryAvailableBytes: "memory_available_bytes", memoryBounceBytes: "memory_bounce_bytes", memoryBuffersBytes: "memory_buffers_bytes", memoryCachedBytes: "memory_cached_bytes", memoryCmaFreeBytes: "memory_cma_free_bytes", memoryCmaTotalBytes: "memory_cma_total_bytes", memoryCommitLimitBytes: "memory_commit_limit_bytes", memoryCommittedAsBytes: "memory_committed_as_bytes", memoryDirtyBytes: "memory_dirty_bytes", memoryFreeBytes: "memory_free_bytes", memoryHighFreeBytes: "memory_high_free_bytes", memoryHighTotalBytes: "memory_high_total_bytes", memoryHugepagesFree: "memory_hugepages_free", memoryHugepagesRsvd: "memory_hugepages_rsvd", memoryHugepagesSurp: "memory_hugepages_surp", memoryHugepagesTotal: "memory_hugepages_total", memoryHugepagesizeBytes: "memory_hugepagesize_bytes", memoryInactiveBytes: "memory_inactive_bytes", memoryKReclaimableBytes: "memory_k_reclaimable_bytes", memoryKernelStackBytes: "memory_kernel_stack_bytes", memoryLowFreeBytes: "memory_low_free_bytes", memoryLowTotalBytes: "memory_low_total_bytes", memoryMappedBytes: "memory_mapped_bytes", memoryPageTablesBytes: "memory_page_tables_bytes", memoryPerCpuBytes: "memory_per_cpu_bytes", memoryPressureFullTotalUs: "memory_pressure_full_total_us", memoryPressureFull_10s: "memory_pressure_full_10s", memoryPressureFull_300s: "memory_pressure_full_300s", memoryPressureFull_60s: "memory_pressure_full_60s", memoryPressureSomeTotalUs: "memory_pressure_some_total_us", memoryPressureSome_10s: "memory_pressure_some_10s", memoryPressureSome_300s: "memory_pressure_some_300s", memoryPressureSome_60s: "memory_pressure_some_60s", memorySReclaimableBytes: "memory_s_reclaimable_bytes", memorySUnreclaimBytes: "memory_s_unreclaim_bytes", memorySecondaryPageTablesBytes: "memory_secondary_page_tables_bytes", memoryShmemBytes: "memory_shmem_bytes", memoryShmemHugepagesBytes: "memory_shmem_hugepages_bytes", memoryShmemPmdMappedBytes: "memory_shmem_pmd_mapped_bytes", memorySlabBytes: "memory_slab_bytes", memorySwapCachedBytes: "memory_swap_cached_bytes", memorySwapFreeBytes: "memory_swap_free_bytes", memorySwapTotalBytes: "memory_swap_total_bytes", memoryTotalBytes: "memory_total_bytes", memoryVmallocChunkBytes: "memory_vmalloc_chunk_bytes", memoryVmallocTotalBytes: "memory_vmalloc_total_bytes", memoryVmallocUsedBytes: "memory_vmalloc_used_bytes", memoryWritebackBytes: "memory_writeback_bytes", memoryWritebackTmpBytes: "memory_writeback_tmp_bytes", memoryZSwapBytes: "memory_z_swap_bytes", memoryZSwappedBytes: "memory_z_swapped_bytes", modifiedGreTunnel: "modified_gre_tunnel", modifiedGreTunnels: "modified_gre_tunnels", modifiedInterconnect: "modified_interconnect", modifiedInterconnects: "modified_interconnects", modifiedIpsecTunnel: "modified_ipsec_tunnel", modifiedIpsecTunnels: "modified_ipsec_tunnels", modifiedOn: "modified_on", modifiedRoute: "modified_route", modifiedRoutes: "modified_routes", mountPoint: "mount_point", mplsInterconnect: "mpls_interconnect", nextHop: "next_hop", offsetTime: "offset_time", ownershipChallenge: "ownership_challenge", packetLimit: "packet_limit", packetsCaptured: "packets_captured", portRanges: "port_ranges", probedMtu: "probed_mtu", provisionLicense: "provision_license", pskMetadata: "psk_metadata", recentHealthyPings: "recent_healthy_pings", recentUnhealthyPings: "recent_unhealthy_pings", recvBytes: "recv_bytes", recvCompressed: "recv_compressed", recvDrop: "recv_drop", recvErrs: "recv_errs", recvFifo: "recv_fifo", recvFrame: "recv_frame", recvMulticast: "recv_multicast", recvPackets: "recv_packets", replayProtection: "replay_protection", routedSubnets: "routed_subnets", secondaryAddress: "secondary_address", secondaryConnectorId: "secondary_connector_id", sectorsDiscarded: "sectors_discarded", sectorsRead: "sectors_read", sectorsWritten: "sectors_written", sentBytes: "sent_bytes", sentCarrier: "sent_carrier", sentColls: "sent_colls", sentCompressed: "sent_compressed", sentDrop: "sent_drop", sentErrs: "sent_errs", sentFifo: "sent_fifo", sentPackets: "sent_packets", serialNumber: "serial_number", serverAddresses: "server_addresses", siteId: "site_id", snmpIcmpInAddrMaskReps: "snmp_icmp_in_addr_mask_reps", snmpIcmpInAddrMasks: "snmp_icmp_in_addr_masks", snmpIcmpInCsumErrors: "snmp_icmp_in_csum_errors", snmpIcmpInDestUnreachs: "snmp_icmp_in_dest_unreachs", snmpIcmpInEchoReps: "snmp_icmp_in_echo_reps", snmpIcmpInEchos: "snmp_icmp_in_echos", snmpIcmpInErrors: "snmp_icmp_in_errors", snmpIcmpInMsgs: "snmp_icmp_in_msgs", snmpIcmpInParmProbs: "snmp_icmp_in_parm_probs", snmpIcmpInRedirects: "snmp_icmp_in_redirects", snmpIcmpInSrcQuenchs: "snmp_icmp_in_src_quenchs", snmpIcmpInTimeExcds: "snmp_icmp_in_time_excds", snmpIcmpInTimestampReps: "snmp_icmp_in_timestamp_reps", snmpIcmpInTimestamps: "snmp_icmp_in_timestamps", snmpIcmpOutAddrMaskReps: "snmp_icmp_out_addr_mask_reps", snmpIcmpOutAddrMasks: "snmp_icmp_out_addr_masks", snmpIcmpOutDestUnreachs: "snmp_icmp_out_dest_unreachs", snmpIcmpOutEchoReps: "snmp_icmp_out_echo_reps", snmpIcmpOutEchos: "snmp_icmp_out_echos", snmpIcmpOutErrors: "snmp_icmp_out_errors", snmpIcmpOutMsgs: "snmp_icmp_out_msgs", snmpIcmpOutParmProbs: "snmp_icmp_out_parm_probs", snmpIcmpOutRedirects: "snmp_icmp_out_redirects", snmpIcmpOutSrcQuenchs: "snmp_icmp_out_src_quenchs", snmpIcmpOutTimeExcds: "snmp_icmp_out_time_excds", snmpIcmpOutTimestampReps: "snmp_icmp_out_timestamp_reps", snmpIcmpOutTimestamps: "snmp_icmp_out_timestamps", snmpIpDefaultTtl: "snmp_ip_default_ttl", snmpIpForwDatagrams: "snmp_ip_forw_datagrams", snmpIpForwardingEnabled: "snmp_ip_forwarding_enabled", snmpIpFragCreates: "snmp_ip_frag_creates", snmpIpFragFails: "snmp_ip_frag_fails", snmpIpFragOks: "snmp_ip_frag_oks", snmpIpInAddrErrors: "snmp_ip_in_addr_errors", snmpIpInDelivers: "snmp_ip_in_delivers", snmpIpInDiscards: "snmp_ip_in_discards", snmpIpInHdrErrors: "snmp_ip_in_hdr_errors", snmpIpInReceives: "snmp_ip_in_receives", snmpIpInUnknownProtos: "snmp_ip_in_unknown_protos", snmpIpOutDiscards: "snmp_ip_out_discards", snmpIpOutNoRoutes: "snmp_ip_out_no_routes", snmpIpOutRequests: "snmp_ip_out_requests", snmpIpReasmFails: "snmp_ip_reasm_fails", snmpIpReasmOks: "snmp_ip_reasm_oks", snmpIpReasmReqds: "snmp_ip_reasm_reqds", snmpIpReasmTimeout: "snmp_ip_reasm_timeout", snmpTcpActiveOpens: "snmp_tcp_active_opens", snmpTcpAttemptFails: "snmp_tcp_attempt_fails", snmpTcpCurrEstab: "snmp_tcp_curr_estab", snmpTcpEstabResets: "snmp_tcp_estab_resets", snmpTcpInCsumErrors: "snmp_tcp_in_csum_errors", snmpTcpInErrs: "snmp_tcp_in_errs", snmpTcpInSegs: "snmp_tcp_in_segs", snmpTcpMaxConn: "snmp_tcp_max_conn", snmpTcpOutRsts: "snmp_tcp_out_rsts", snmpTcpOutSegs: "snmp_tcp_out_segs", snmpTcpPassiveOpens: "snmp_tcp_passive_opens", snmpTcpRetransSegs: "snmp_tcp_retrans_segs", snmpTcpRtoMax: "snmp_tcp_rto_max", snmpTcpRtoMin: "snmp_tcp_rto_min", snmpUdpInDatagrams: "snmp_udp_in_datagrams", snmpUdpInErrors: "snmp_udp_in_errors", snmpUdpNoPorts: "snmp_udp_no_ports", snmpUdpOutDatagrams: "snmp_udp_out_datagrams", sourceAddress: "source_address", sourcePort: "source_port", sourceRampId: "source_ramp_id", sourceSubnets: "source_subnets", staticAddressing: "static_addressing", staticPrefix: "static_prefix", stopRequested: "stop_requested", successfullyAppliedPsks: "successfully_applied_psks", systemBootTimeS: "system_boot_time_s", tcpEstablished: "tcp_established", timeDiscardingMs: "time_discarding_ms", timeFlushingMs: "time_flushing_ms", timeInProgressMs: "time_in_progress_ms", timeLimit: "time_limit", timeReadingMs: "time_reading_ms", timeWritingMs: "time_writing_ms", totalBytes: "total_bytes", totalInodes: "total_inodes", tunnelId: "tunnel_id", unappliedPsks: "unapplied_psks", updatedAt: "updated_at", uptimeIdleMs: "uptime_idle_ms", uptimeTotalMs: "uptime_total_ms", virtualAddress: "virtual_address", virtualPortReservationId: "virtual_port_reservation_id", vlanTag: "vlan_tag", weightedTimeInProgressMs: "weighted_time_in_progress_ms", writesMerged: "writes_merged", }; export class AppNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("AppNotFound", { 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 GreTunnelNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("GreTunnelNotFound", { code: S.Number, message: S.String, }), [{ code: 1029 }], ) {} export class IpsecTunnelNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("IpsecTunnelNotFound", { code: S.Number, message: S.String, }), [{ code: 1032 }], ) {} export class MagicTransitNotOnboarded extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "MagicTransitNotOnboarded", { code: S.Number, message: S.String, }, ), [{ code: 1012 }], ) {} export class MagicWanUnauthorized extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "MagicWanUnauthorized", { code: S.Number, message: S.String, }, ), [{ code: 1025 }], ) {} export class RouteNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("RouteNotFound", { code: S.Number, message: S.String, }), [{ code: 1020 }], ) {} export class SiteAclNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SiteAclNotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export class SiteLanNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SiteLanNotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export class SiteNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SiteNotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export class SiteWanNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SiteWanNotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export interface BulkPutCfInterconnectsRequest { /** Identifier */ accountId: string; xMagicNewHcTarget?: boolean; } export const BulkPutCfInterconnectsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/cf_interconnects", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutCfInterconnectsRequest", }) as any as S.Schema; export interface CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre { /** The IP address assigned to the Cloudflare side of the GRE tunnel created as part of the Interconnect. */ cloudflareEndpoint?: string | null; } export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre = /*@__PURE__*/ S.suspend(() => S.Struct({ cloudflareEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("cloudflare_endpoint")), ), }), ).annotate({ identifier: "CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre", }) as any as S.Schema; export type CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckRate = | "low" | "mid" | "high"; export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckRate = /*@__PURE__*/ S.String; export interface CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget { /** The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests. */ effective?: string | null; /** The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used. */ saved?: string | null; } export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget = /*@__PURE__*/ S.suspend(() => S.Struct({ effective: S.optional(S.NullOr(S.String)), saved: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget", }) as any as S.Schema; export type CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckType = | "reply" | "request"; export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckType = /*@__PURE__*/ S.String; export interface CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheck { /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckType | null; } export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr( CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckRate, ), ), target: S.optional( S.NullOr( CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTarget, ), ), type: S.optional( S.NullOr( CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckType, ), ), }), ).annotate({ identifier: "CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheck", }) as any as S.Schema; export interface CfInterconnectsBulkUpdateResponseModifiedInterconnectsItem { /** Identifier */ id?: string | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ coloName?: string | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the interconnect. */ description?: string | null; /** The configuration specific to GRE interconnects. */ gre?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre | null; healthCheck?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheck | null; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress?: string | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576. */ mtu?: number | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ name?: string | null; /** An identifier that correlates this interconnect with the corresponding V2 CNI interconnect resource. */ virtualPortReservationId?: string | null; } export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), gre: S.optional( S.NullOr(CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre), ), healthCheck: S.optional( S.NullOr( CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheck, ).pipe(T.Body("health_check")), ), interfaceAddress: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address")), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), virtualPortReservationId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_port_reservation_id")), ), }), ).annotate({ identifier: "CfInterconnectsBulkUpdateResponseModifiedInterconnectsItem", }) as any as S.Schema; export type CfInterconnectsBulkUpdateResponseModifiedInterconnectsList = Array; export const CfInterconnectsBulkUpdateResponseModifiedInterconnectsList = /*@__PURE__*/ S.Array( CfInterconnectsBulkUpdateResponseModifiedInterconnectsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface BulkPutCfInterconnectsResponse { modified?: boolean | null; modifiedInterconnects?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsList | null; } export const BulkPutCfInterconnectsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedInterconnects: S.optional( S.NullOr(CfInterconnectsBulkUpdateResponseModifiedInterconnectsList).pipe( T.Body("modified_interconnects"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutCfInterconnectsResponse", }) as any as S.Schema; export interface BulkPutGreTunnelsRequest { /** Identifier */ accountId: string; xMagicNewHcTarget?: boolean; } export const BulkPutGreTunnelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/gre_tunnels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutGreTunnelsRequest", }) as any as S.Schema; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpExtraPrefixesList = Array; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgp", }) as any as S.Schema; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatusState = /*@__PURE__*/ S.String; export interface GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatus { state: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatus", }) as any as S.Schema; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckRate = | "low" | "mid" | "high"; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckType = | "reply" | "request"; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckType | null; } export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckDirection, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckRate, ), ), target: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckTarget, ), ), type: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheckType, ), ), }), ).annotate({ identifier: "GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheck", }) as any as S.Schema; export interface GreTunnelsBulkUpdateResponseModifiedGreTunnelsItem { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgp | null; bgpStatus?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the GRE tunnel. */ description?: string | null; healthCheck?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number | null; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number | null; } export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional( S.NullOr(GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgp), ), bgpStatus: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemBgpStatus, ).pipe(T.Body("bgp_status")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItemHealthCheck, ).pipe(T.Body("health_check")), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "GreTunnelsBulkUpdateResponseModifiedGreTunnelsItem", }) as any as S.Schema; export type GreTunnelsBulkUpdateResponseModifiedGreTunnelsList = Array; export const GreTunnelsBulkUpdateResponseModifiedGreTunnelsList = /*@__PURE__*/ S.Array( GreTunnelsBulkUpdateResponseModifiedGreTunnelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface BulkPutGreTunnelsResponse { modified?: boolean | null; modifiedGreTunnels?: GreTunnelsBulkUpdateResponseModifiedGreTunnelsList | null; } export const BulkPutGreTunnelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedGreTunnels: S.optional( S.NullOr(GreTunnelsBulkUpdateResponseModifiedGreTunnelsList).pipe( T.Body("modified_gre_tunnels"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutGreTunnelsResponse", }) as any as S.Schema; export interface BulkPutIpsecTunnelsRequest { /** Identifier */ accountId: string; xMagicNewHcTarget?: boolean; } export const BulkPutIpsecTunnelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/ipsec_tunnels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutIpsecTunnelsRequest", }) as any as S.Schema; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpExtraPrefixesList = Array; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgp", }) as any as S.Schema; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatusState = /*@__PURE__*/ S.String; export interface IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatus { state: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatus", }) as any as S.Schema; export interface IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities { /** A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The */ fqdnId?: string | null; } export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities = /*@__PURE__*/ S.suspend(() => S.Struct({ fqdnId: S.optional(S.NullOr(S.String).pipe(T.Body("fqdn_id"))), }), ).annotate({ identifier: "IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities", }) as any as S.Schema; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckRate = | "low" | "mid" | "high"; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckType = | "reply" | "request"; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckType | null; } export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckDirection, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckRate, ), ), target: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckTarget, ), ), type: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheckType, ), ), }), ).annotate({ identifier: "IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheck", }) as any as S.Schema; export interface IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata { /** The date and time the tunnel was last modified. */ lastGeneratedOn?: string | null; } export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({ lastGeneratedOn: S.optional( S.NullOr(S.String).pipe(T.Body("last_generated_on")), ), }), ).annotate({ identifier: "IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata", }) as any as S.Schema; export interface IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItem { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel (Phase 2). */ allowNullCipher?: boolean | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgp | null; bgpStatus?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; customRemoteIdentities?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities | null; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string | null; /** An optional description forthe IPsec tunnel. */ description?: string | null; healthCheck?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean | null; } export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, allowNullCipher: S.optional( S.NullOr(S.Boolean).pipe(T.Body("allow_null_cipher")), ), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional( S.NullOr(IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgp), ), bgpStatus: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemBgpStatus, ).pipe(T.Body("bgp_status")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), customRemoteIdentities: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities, ).pipe(T.Body("custom_remote_identities")), ), customerEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("customer_endpoint")), ), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemHealthCheck, ).pipe(T.Body("health_check")), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), replayProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("replay_protection")), ), }), ).annotate({ identifier: "IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItem", }) as any as S.Schema; export type IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsList = Array; export const IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsList = /*@__PURE__*/ S.Array( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface BulkPutIpsecTunnelsResponse { modified?: boolean | null; modifiedIpsecTunnels?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsList | null; } export const BulkPutIpsecTunnelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedIpsecTunnels: S.optional( S.NullOr(IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsList).pipe( T.Body("modified_ipsec_tunnels"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutIpsecTunnelsResponse", }) as any as S.Schema; export type RoutesBulkUpdateRequestRoutesItemScopeColoNamesList = Array; export const RoutesBulkUpdateRequestRoutesItemScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesBulkUpdateRequestRoutesItemScopeColoRegionsList = Array; export const RoutesBulkUpdateRequestRoutesItemScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesBulkUpdateRequestRoutesItemScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesBulkUpdateRequestRoutesItemScopeColoNamesList; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesBulkUpdateRequestRoutesItemScopeColoRegionsList; } export const RoutesBulkUpdateRequestRoutesItemScope = /*@__PURE__*/ S.suspend( () => S.Struct({ coloNames: S.optional( RoutesBulkUpdateRequestRoutesItemScopeColoNamesList.pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( RoutesBulkUpdateRequestRoutesItemScopeColoRegionsList.pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesBulkUpdateRequestRoutesItemScope", }) as any as S.Schema; export interface RoutesBulkUpdateRequestRoutesItem { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** An optional human provided description of the static route. */ description?: string; /** Used only for ECMP routes. */ scope?: RoutesBulkUpdateRequestRoutesItemScope; /** Optional weight of the ECMP scope - if provided. */ weight?: number; } export const RoutesBulkUpdateRequestRoutesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, description: S.optional(S.String), scope: S.optional(RoutesBulkUpdateRequestRoutesItemScope), weight: S.optional(S.Number), }), ).annotate({ identifier: "RoutesBulkUpdateRequestRoutesItem", }) as any as S.Schema; export type RoutesBulkUpdateRequestRoutesList = Array; export const RoutesBulkUpdateRequestRoutesList = /*@__PURE__*/ S.Array( RoutesBulkUpdateRequestRoutesItem, ) as any as S.Schema; export interface BulkPutRoutesRequest { /** Identifier */ accountId: string; routes: RoutesBulkUpdateRequestRoutesList; } export const BulkPutRoutesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), routes: RoutesBulkUpdateRequestRoutesList, }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/routes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutRoutesRequest", }) as any as S.Schema; export type RoutesBulkUpdateResponseModifiedRoutesItemScopeColoNamesList = Array; export const RoutesBulkUpdateResponseModifiedRoutesItemScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesBulkUpdateResponseModifiedRoutesItemScopeColoRegionsList = Array; export const RoutesBulkUpdateResponseModifiedRoutesItemScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesBulkUpdateResponseModifiedRoutesItemScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesBulkUpdateResponseModifiedRoutesItemScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesBulkUpdateResponseModifiedRoutesItemScopeColoRegionsList | null; } export const RoutesBulkUpdateResponseModifiedRoutesItemScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( S.NullOr( RoutesBulkUpdateResponseModifiedRoutesItemScopeColoNamesList, ).pipe(T.Body("colo_names")), ), coloRegions: S.optional( S.NullOr( RoutesBulkUpdateResponseModifiedRoutesItemScopeColoRegionsList, ).pipe(T.Body("colo_regions")), ), }), ).annotate({ identifier: "RoutesBulkUpdateResponseModifiedRoutesItemScope", }) as any as S.Schema; export interface RoutesBulkUpdateResponseModifiedRoutesItem { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesBulkUpdateResponseModifiedRoutesItemScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const RoutesBulkUpdateResponseModifiedRoutesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional( S.NullOr(RoutesBulkUpdateResponseModifiedRoutesItemScope), ), weight: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RoutesBulkUpdateResponseModifiedRoutesItem", }) as any as S.Schema; export type RoutesBulkUpdateResponseModifiedRoutesList = Array; export const RoutesBulkUpdateResponseModifiedRoutesList = /*@__PURE__*/ S.Array( RoutesBulkUpdateResponseModifiedRoutesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface BulkPutRoutesResponse { modified?: boolean | null; modifiedRoutes?: RoutesBulkUpdateResponseModifiedRoutesList | null; } export const BulkPutRoutesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedRoutes: S.optional( S.NullOr(RoutesBulkUpdateResponseModifiedRoutesList).pipe( T.Body("modified_routes"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPutRoutesResponse", }) as any as S.Schema; export type AppsCreateRequestHostnamesList = Array; export const AppsCreateRequestHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateRequestIpSubnetsList = Array; export const AppsCreateRequestIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateRequestSourceSubnetsList = Array; export const AppsCreateRequestSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateAppRequest { /** Identifier */ accountId: string; /** Display name for the app. */ name: string; /** Category of the app. */ type: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsCreateRequestHostnamesList; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsCreateRequestIpSubnetsList; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsCreateRequestSourceSubnetsList; } export const CreateAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, type: S.String, hostnames: S.optional(AppsCreateRequestHostnamesList), ipSubnets: S.optional( AppsCreateRequestIpSubnetsList.pipe(T.Body("ip_subnets")), ), sourceSubnets: S.optional( AppsCreateRequestSourceSubnetsList.pipe(T.Body("source_subnets")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/apps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAppRequest", }) as any as S.Schema; export type AppsCreateResponseHostnamesList = Array; export const AppsCreateResponseHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateResponseIpSubnetsList = Array; export const AppsCreateResponseIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateResponseSourceSubnetsList = Array; export const AppsCreateResponseSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAppResponse { /** Magic account app ID. */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsCreateResponseHostnamesList | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsCreateResponseIpSubnetsList | null; /** Display name for the app. */ name?: string | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsCreateResponseSourceSubnetsList | null; /** Category of the app. */ type?: string | null; } export const CreateAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), hostnames: S.optional(S.NullOr(AppsCreateResponseHostnamesList)), ipSubnets: S.optional( S.NullOr(AppsCreateResponseIpSubnetsList).pipe(T.Body("ip_subnets")), ), name: S.optional(S.NullOr(S.String)), sourceSubnets: S.optional( S.NullOr(AppsCreateResponseSourceSubnetsList).pipe( T.Body("source_subnets"), ), ), type: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAppResponse", }) as any as S.Schema; export interface Cf1SitesCreateRequestBodyItemLocation { /** Latitude of the CF1 Site. */ lat?: number; /** Longitude of the CF1 Site. */ long?: number; /** Name of nearest town, city, or village. */ name?: string; } export const Cf1SitesCreateRequestBodyItemLocation = /*@__PURE__*/ S.suspend( () => S.Struct({ lat: S.optional(S.Number), long: S.optional(S.Number), name: S.optional(S.String), }), ).annotate({ identifier: "Cf1SitesCreateRequestBodyItemLocation", }) as any as S.Schema; export interface Cf1SitesCreateRequestBodyItem { /** A human-provided name describing the CF1 Site that should be unique within the account. */ name: string; /** Identifier */ id?: string; createdOn?: string; /** A human-provided description of the CF1 Site. */ description?: string; location?: Cf1SitesCreateRequestBodyItemLocation; modifiedOn?: string; } export const Cf1SitesCreateRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, id: S.optional(S.String), createdOn: S.optional(S.String.pipe(T.Body("created_on"))), description: S.optional(S.String), location: S.optional(Cf1SitesCreateRequestBodyItemLocation), modifiedOn: S.optional(S.String.pipe(T.Body("modified_on"))), }), ).annotate({ identifier: "Cf1SitesCreateRequestBodyItem", }) as any as S.Schema; export type Cf1SitesCreateRequestBodyList = Array; export const Cf1SitesCreateRequestBodyList = /*@__PURE__*/ S.Array( Cf1SitesCreateRequestBodyItem, ) as any as S.Schema; export interface CreateCf1SiteRequest { /** Identifier */ accountId: string; body: Cf1SitesCreateRequestBodyList; } export const CreateCf1SiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), body: Cf1SitesCreateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/cf1_sites", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCf1SiteRequest", }) as any as S.Schema; export interface Cf1SitesCreateResultItemLocation { /** Latitude of the CF1 Site. */ lat?: number | null; /** Longitude of the CF1 Site. */ long?: number | null; /** Name of nearest town, city, or village. */ name?: string | null; } export const Cf1SitesCreateResultItemLocation = /*@__PURE__*/ S.suspend(() => S.Struct({ lat: S.optional(S.NullOr(S.Number)), long: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "Cf1SitesCreateResultItemLocation", }) as any as S.Schema; export interface Cf1SitesCreateResultItem { /** A human-provided name describing the CF1 Site that should be unique within the account. */ name: string; /** Identifier */ id?: string | null; createdOn?: string | null; /** A human-provided description of the CF1 Site. */ description?: string | null; location?: Cf1SitesCreateResultItemLocation | null; modifiedOn?: string | null; } export const Cf1SitesCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), location: S.optional(S.NullOr(Cf1SitesCreateResultItemLocation)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }), ).annotate({ identifier: "Cf1SitesCreateResultItem", }) as any as S.Schema; export type Cf1SitesCreateResultList = Array; export const Cf1SitesCreateResultList = /*@__PURE__*/ S.Array( Cf1SitesCreateResultItem, ) as any as S.Schema; export interface CreateCf1SiteResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: Cf1SitesCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const CreateCf1SiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: Cf1SitesCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCf1SiteResponse", }) as any as S.Schema; export type Cf1SitesRampsCreateRequestBodyItemType = | "gre" | "gre_interconnect" | "mpls_interconnect" | "mconn" | "ipsec"; export const Cf1SitesRampsCreateRequestBodyItemType = /*@__PURE__*/ S.String; export interface Cf1SitesRampsCreateRequestBodyItem { /** Identifier of the source network resource to associate as a ramp. */ sourceRampId: string; /** The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. */ type: Cf1SitesRampsCreateRequestBodyItemType | (string & {}); } export const Cf1SitesRampsCreateRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ sourceRampId: S.String.pipe(T.Body("source_ramp_id")), type: Cf1SitesRampsCreateRequestBodyItemType, }), ).annotate({ identifier: "Cf1SitesRampsCreateRequestBodyItem", }) as any as S.Schema; export type Cf1SitesRampsCreateRequestBodyList = Array; export const Cf1SitesRampsCreateRequestBodyList = /*@__PURE__*/ S.Array( Cf1SitesRampsCreateRequestBodyItem, ) as any as S.Schema; export interface CreateCf1SiteRampRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; body: Cf1SitesRampsCreateRequestBodyList; } export const CreateCf1SiteRampRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), body: Cf1SitesRampsCreateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCf1SiteRampRequest", }) as any as S.Schema; export type Cf1SitesRampsCreateResultItemType = | "gre" | "gre_interconnect" | "mpls_interconnect" | "mconn" | "ipsec"; export const Cf1SitesRampsCreateResultItemType = /*@__PURE__*/ S.String; export interface Cf1SitesRampsCreateResultItemGre { /** URL reference to the source network resource that this ramp is managed by. */ managedBy?: string | null; } export const Cf1SitesRampsCreateResultItemGre = /*@__PURE__*/ S.suspend(() => S.Struct({ managedBy: S.optional(S.NullOr(S.String).pipe(T.Body("managed_by"))), }), ).annotate({ identifier: "Cf1SitesRampsCreateResultItemGre", }) as any as S.Schema; export type Cf1SitesRampsCreateResultItemGreInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsCreateResultItemGreInterconnect = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsCreateResultItemIpsec = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsCreateResultItemIpsec = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsCreateResultItemMconn = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsCreateResultItemMconn = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsCreateResultItemMplsInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsCreateResultItemMplsInterconnect = Cf1SitesRampsCreateResultItemGre; export interface Cf1SitesRampsCreateResultItem { /** Identifier */ id: string; createdOn: string; modifiedOn: string; /** A human-provided name describing the ramp that should be unique within the CF1 Site. */ name: string; /** The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. */ type: Cf1SitesRampsCreateResultItemType; /** A human-provided description of the ramp. */ description?: string | null; gre?: Cf1SitesRampsCreateResultItemGre | null; greInterconnect?: Cf1SitesRampsCreateResultItemGre | null; ipsec?: Cf1SitesRampsCreateResultItemGre | null; mconn?: Cf1SitesRampsCreateResultItemGre | null; mplsInterconnect?: Cf1SitesRampsCreateResultItemGre | null; } export const Cf1SitesRampsCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, type: Cf1SitesRampsCreateResultItemType, description: S.optional(S.NullOr(S.String)), gre: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), greInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("gre_interconnect"), ), ), ipsec: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mconn: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mplsInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("mpls_interconnect"), ), ), }), ).annotate({ identifier: "Cf1SitesRampsCreateResultItem", }) as any as S.Schema; export type Cf1SitesRampsCreateResultList = Array; export const Cf1SitesRampsCreateResultList = /*@__PURE__*/ S.Array( Cf1SitesRampsCreateResultItem, ) as any as S.Schema; export interface CreateCf1SiteRampResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: Cf1SitesRampsCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const CreateCf1SiteRampResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: Cf1SitesRampsCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCf1SiteRampResponse", }) as any as S.Schema; export interface ConnectorsCreateRequestDevice { id?: string; /** When true, create and provision a new licence key for the connector. */ provisionLicense?: boolean; serialNumber?: string; } export const ConnectorsCreateRequestDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), provisionLicense: S.optional(S.Boolean.pipe(T.Body("provision_license"))), serialNumber: S.optional(S.String.pipe(T.Body("serial_number"))), }), ).annotate({ identifier: "ConnectorsCreateRequestDevice", }) as any as S.Schema; export type ConnectorsCreateRequestInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsCreateRequestInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsCreateRequestInterruptWindowDaysOfWeekList = Array< ConnectorsCreateRequestInterruptWindowDaysOfWeekItem | (string & {}) >; export const ConnectorsCreateRequestInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsCreateRequestInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsCreateRequestInterruptWindowEmbargoDatesList = Array; export const ConnectorsCreateRequestInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateConnectorRequest { /** Account identifier */ accountId: string; /** Exactly one of id, serial_number, or provision_license must be provided. */ device: ConnectorsCreateRequestDevice; activated?: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek?: ConnectorsCreateRequestInterruptWindowDaysOfWeekList; interruptWindowDurationHours?: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates?: ConnectorsCreateRequestInterruptWindowEmbargoDatesList; interruptWindowHourOfDay?: number; notes?: string; primary?: boolean; siteId?: string; timezone?: string; } export const CreateConnectorRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), device: ConnectorsCreateRequestDevice, activated: S.optional(S.Boolean), interruptWindowDaysOfWeek: S.optional( ConnectorsCreateRequestInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), ), interruptWindowDurationHours: S.optional( S.Number.pipe(T.Body("interrupt_window_duration_hours")), ), interruptWindowEmbargoDates: S.optional( ConnectorsCreateRequestInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), ), interruptWindowHourOfDay: S.optional( S.Number.pipe(T.Body("interrupt_window_hour_of_day")), ), notes: S.optional(S.String), primary: S.optional(S.Boolean), siteId: S.optional(S.String.pipe(T.Body("site_id"))), timezone: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/connectors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateConnectorRequest", }) as any as S.Schema; export type ConnectorsCreateResponseInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsCreateResponseInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsCreateResponseInterruptWindowDaysOfWeekList = Array; export const ConnectorsCreateResponseInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsCreateResponseInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsCreateResponseInterruptWindowEmbargoDatesList = Array; export const ConnectorsCreateResponseInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConnectorsCreateResponseDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsCreateResponseDeviceType = /*@__PURE__*/ S.String; export interface ConnectorsCreateResponseDevice { id: string; serialNumber?: string | null; type?: ConnectorsCreateResponseDeviceType | null; } export const ConnectorsCreateResponseDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), type: S.optional(S.NullOr(ConnectorsCreateResponseDeviceType)), }), ).annotate({ identifier: "ConnectorsCreateResponseDevice", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateConnectorResponse { id: string; activated: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek: ConnectorsCreateResponseInterruptWindowDaysOfWeekList; interruptWindowDurationHours: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates: ConnectorsCreateResponseInterruptWindowEmbargoDatesList; interruptWindowHourOfDay: number; lastUpdated: string; notes: string; primary: boolean; timezone: string; device?: ConnectorsCreateResponseDevice | null; lastHeartbeat?: string | null; lastSeenVersion?: string | null; licenseKey?: string | null; siteId?: string | null; } export const CreateConnectorResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, activated: S.Boolean, interruptWindowDaysOfWeek: ConnectorsCreateResponseInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), interruptWindowDurationHours: S.Number.pipe( T.Body("interrupt_window_duration_hours"), ), interruptWindowEmbargoDates: ConnectorsCreateResponseInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), interruptWindowHourOfDay: S.Number.pipe( T.Body("interrupt_window_hour_of_day"), ), lastUpdated: S.String.pipe(T.Body("last_updated")), notes: S.String, primary: S.Boolean, timezone: S.String, device: S.optional(S.NullOr(ConnectorsCreateResponseDevice)), lastHeartbeat: S.optional( S.NullOr(S.String).pipe(T.Body("last_heartbeat")), ), lastSeenVersion: S.optional( S.NullOr(S.String).pipe(T.Body("last_seen_version")), ), licenseKey: S.optional(S.NullOr(S.String).pipe(T.Body("license_key"))), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateConnectorResponse", }) as any as S.Schema; export type GreTunnelsCreateRequestBgpExtraPrefixesList = Array; export const GreTunnelsCreateRequestBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsCreateRequestBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsCreateRequestBgpExtraPrefixesList; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string; /** MD5 key to use for session authentication. */ md5Key?: string; } export const GreTunnelsCreateRequestBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional(S.String.pipe(T.Body("export_filter_id"))), extraPrefixes: S.optional( GreTunnelsCreateRequestBgpExtraPrefixesList.pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional(S.String.pipe(T.Body("import_filter_id"))), md5Key: S.optional(S.String.pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsCreateRequestBgp", }) as any as S.Schema; export type GreTunnelsCreateRequestHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsCreateRequestHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsCreateRequestHealthCheckRate = "low" | "mid" | "high"; export const GreTunnelsCreateRequestHealthCheckRate = /*@__PURE__*/ S.String; export interface GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget { /** The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests. */ effective?: string; /** The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used. */ saved?: string; } export const GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget = /*@__PURE__*/ S.suspend(() => S.Struct({ effective: S.optional(S.String), saved: S.optional(S.String), }), ).annotate({ identifier: "GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget", }) as any as S.Schema; export type GreTunnelsCreateRequestHealthCheckTarget = | string | GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsCreateRequestHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsCreateRequestHealthCheckType = "reply" | "request"; export const GreTunnelsCreateRequestHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsCreateRequestHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsCreateRequestHealthCheckDirection | (string & {}); /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsCreateRequestHealthCheckRate | (string & {}); /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsCreateRequestHealthCheckTarget; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsCreateRequestHealthCheckType | (string & {}); } export const GreTunnelsCreateRequestHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional(GreTunnelsCreateRequestHealthCheckDirection), enabled: S.optional(S.Boolean), rate: S.optional(GreTunnelsCreateRequestHealthCheckRate), target: S.optional(GreTunnelsCreateRequestHealthCheckTarget), type: S.optional(GreTunnelsCreateRequestHealthCheckType), }), ).annotate({ identifier: "GreTunnelsCreateRequestHealthCheck", }) as any as S.Schema; export interface CreateGreTunnelRequest { /** Identifier */ accountId: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean; bgp?: GreTunnelsCreateRequestBgp; /** An optional description of the GRE tunnel. */ description?: string; healthCheck?: GreTunnelsCreateRequestHealthCheck; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number; xMagicNewHcTarget?: boolean; } export const CreateGreTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.Boolean.pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(GreTunnelsCreateRequestBgp), description: S.optional(S.String), healthCheck: S.optional( GreTunnelsCreateRequestHealthCheck.pipe(T.Body("health_check")), ), interfaceAddress6: S.optional(S.String.pipe(T.Body("interface_address6"))), mtu: S.optional(S.Number), ttl: S.optional(S.Number), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/gre_tunnels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateGreTunnelRequest", }) as any as S.Schema; export type GreTunnelsCreateResponseBgpExtraPrefixesList = Array; export const GreTunnelsCreateResponseBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsCreateResponseBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsCreateResponseBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const GreTunnelsCreateResponseBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr(GreTunnelsCreateResponseBgpExtraPrefixesList).pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsCreateResponseBgp", }) as any as S.Schema; export type GreTunnelsCreateResponseBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const GreTunnelsCreateResponseBgpStatusState = /*@__PURE__*/ S.String; export interface GreTunnelsCreateResponseBgpStatus { state: GreTunnelsCreateResponseBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const GreTunnelsCreateResponseBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: GreTunnelsCreateResponseBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "GreTunnelsCreateResponseBgpStatus", }) as any as S.Schema; export type GreTunnelsCreateResponseHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsCreateResponseHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsCreateResponseHealthCheckRate = "low" | "mid" | "high"; export const GreTunnelsCreateResponseHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsCreateResponseHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsCreateResponseHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsCreateResponseHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsCreateResponseHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsCreateResponseHealthCheckType = "reply" | "request"; export const GreTunnelsCreateResponseHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsCreateResponseHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsCreateResponseHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsCreateResponseHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsCreateResponseHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsCreateResponseHealthCheckType | null; } export const GreTunnelsCreateResponseHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(GreTunnelsCreateResponseHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional(S.NullOr(GreTunnelsCreateResponseHealthCheckRate)), target: S.optional(S.NullOr(GreTunnelsCreateResponseHealthCheckTarget)), type: S.optional(S.NullOr(GreTunnelsCreateResponseHealthCheckType)), }), ).annotate({ identifier: "GreTunnelsCreateResponseHealthCheck", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateGreTunnelResponse { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: GreTunnelsCreateResponseBgp | null; bgpStatus?: GreTunnelsCreateResponseBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the GRE tunnel. */ description?: string | null; healthCheck?: GreTunnelsCreateResponseHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number | null; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number | null; } export const CreateGreTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(GreTunnelsCreateResponseBgp)), bgpStatus: S.optional( S.NullOr(GreTunnelsCreateResponseBgpStatus).pipe(T.Body("bgp_status")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(GreTunnelsCreateResponseHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateGreTunnelResponse", }) as any as S.Schema; export type IpsecTunnelsCreateRequestBgpExtraPrefixesList = Array; export const IpsecTunnelsCreateRequestBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsCreateRequestBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsCreateRequestBgpExtraPrefixesList; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string; /** MD5 key to use for session authentication. */ md5Key?: string; } export const IpsecTunnelsCreateRequestBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional(S.String.pipe(T.Body("export_filter_id"))), extraPrefixes: S.optional( IpsecTunnelsCreateRequestBgpExtraPrefixesList.pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional(S.String.pipe(T.Body("import_filter_id"))), md5Key: S.optional(S.String.pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsCreateRequestBgp", }) as any as S.Schema; export interface IpsecTunnelsCreateRequestCustomRemoteIdentities { /** A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The */ fqdnId?: string; } export const IpsecTunnelsCreateRequestCustomRemoteIdentities = /*@__PURE__*/ S.suspend(() => S.Struct({ fqdnId: S.optional(S.String.pipe(T.Body("fqdn_id"))), }), ).annotate({ identifier: "IpsecTunnelsCreateRequestCustomRemoteIdentities", }) as any as S.Schema; export type IpsecTunnelsCreateRequestHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsCreateRequestHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsCreateRequestHealthCheckRate = "low" | "mid" | "high"; export const IpsecTunnelsCreateRequestHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsCreateRequestHealthCheckTarget = | string | GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsCreateRequestHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsCreateRequestHealthCheckType = "reply" | "request"; export const IpsecTunnelsCreateRequestHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsCreateRequestHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsCreateRequestHealthCheckDirection | (string & {}); /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsCreateRequestHealthCheckRate | (string & {}); /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsCreateRequestHealthCheckTarget; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsCreateRequestHealthCheckType | (string & {}); } export const IpsecTunnelsCreateRequestHealthCheck = /*@__PURE__*/ S.suspend( () => S.Struct({ direction: S.optional(IpsecTunnelsCreateRequestHealthCheckDirection), enabled: S.optional(S.Boolean), rate: S.optional(IpsecTunnelsCreateRequestHealthCheckRate), target: S.optional(IpsecTunnelsCreateRequestHealthCheckTarget), type: S.optional(IpsecTunnelsCreateRequestHealthCheckType), }), ).annotate({ identifier: "IpsecTunnelsCreateRequestHealthCheck", }) as any as S.Schema; export interface CreateIpsecTunnelRequest { /** Identifier */ accountId: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean; bgp?: IpsecTunnelsCreateRequestBgp; customRemoteIdentities?: IpsecTunnelsCreateRequestCustomRemoteIdentities; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string; /** An optional description forthe IPsec tunnel. */ description?: string; healthCheck?: IpsecTunnelsCreateRequestHealthCheck; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string; /** A randomly generated or provided string for use in the IPsec tunnel. */ psk?: string; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean; xMagicNewHcTarget?: boolean; } export const CreateIpsecTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.Boolean.pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(IpsecTunnelsCreateRequestBgp), customRemoteIdentities: S.optional( IpsecTunnelsCreateRequestCustomRemoteIdentities.pipe( T.Body("custom_remote_identities"), ), ), customerEndpoint: S.optional(S.String.pipe(T.Body("customer_endpoint"))), description: S.optional(S.String), healthCheck: S.optional( IpsecTunnelsCreateRequestHealthCheck.pipe(T.Body("health_check")), ), interfaceAddress6: S.optional(S.String.pipe(T.Body("interface_address6"))), psk: S.optional(S.String), replayProtection: S.optional(S.Boolean.pipe(T.Body("replay_protection"))), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/ipsec_tunnels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateIpsecTunnelRequest", }) as any as S.Schema; export type IpsecTunnelsCreateResponseBgpExtraPrefixesList = Array; export const IpsecTunnelsCreateResponseBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsCreateResponseBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsCreateResponseBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const IpsecTunnelsCreateResponseBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr(IpsecTunnelsCreateResponseBgpExtraPrefixesList).pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsCreateResponseBgp", }) as any as S.Schema; export type IpsecTunnelsCreateResponseBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const IpsecTunnelsCreateResponseBgpStatusState = /*@__PURE__*/ S.String; export interface IpsecTunnelsCreateResponseBgpStatus { state: IpsecTunnelsCreateResponseBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const IpsecTunnelsCreateResponseBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: IpsecTunnelsCreateResponseBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "IpsecTunnelsCreateResponseBgpStatus", }) as any as S.Schema; export type IpsecTunnelsCreateResponseCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export const IpsecTunnelsCreateResponseCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export type IpsecTunnelsCreateResponseHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsCreateResponseHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsCreateResponseHealthCheckRate = "low" | "mid" | "high"; export const IpsecTunnelsCreateResponseHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsCreateResponseHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsCreateResponseHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsCreateResponseHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsCreateResponseHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsCreateResponseHealthCheckType = "reply" | "request"; export const IpsecTunnelsCreateResponseHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsCreateResponseHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsCreateResponseHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsCreateResponseHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsCreateResponseHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsCreateResponseHealthCheckType | null; } export const IpsecTunnelsCreateResponseHealthCheck = /*@__PURE__*/ S.suspend( () => S.Struct({ direction: S.optional( S.NullOr(IpsecTunnelsCreateResponseHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional(S.NullOr(IpsecTunnelsCreateResponseHealthCheckRate)), target: S.optional(S.NullOr(IpsecTunnelsCreateResponseHealthCheckTarget)), type: S.optional(S.NullOr(IpsecTunnelsCreateResponseHealthCheckType)), }), ).annotate({ identifier: "IpsecTunnelsCreateResponseHealthCheck", }) as any as S.Schema; export type IpsecTunnelsCreateResponsePskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsCreateResponsePskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateIpsecTunnelResponse { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel (Phase 2). */ allowNullCipher?: boolean | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: IpsecTunnelsCreateResponseBgp | null; bgpStatus?: IpsecTunnelsCreateResponseBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; customRemoteIdentities?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities | null; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string | null; /** An optional description forthe IPsec tunnel. */ description?: string | null; healthCheck?: IpsecTunnelsCreateResponseHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean | null; } export const CreateIpsecTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, allowNullCipher: S.optional( S.NullOr(S.Boolean).pipe(T.Body("allow_null_cipher")), ), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(IpsecTunnelsCreateResponseBgp)), bgpStatus: S.optional( S.NullOr(IpsecTunnelsCreateResponseBgpStatus).pipe(T.Body("bgp_status")), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), customRemoteIdentities: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities, ).pipe(T.Body("custom_remote_identities")), ), customerEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("customer_endpoint")), ), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(IpsecTunnelsCreateResponseHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), replayProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("replay_protection")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateIpsecTunnelResponse", }) as any as S.Schema; export type PcapsCreateRequestSystem = "magic-transit"; export const PcapsCreateRequestSystem = /*@__PURE__*/ S.String; export type PcapsCreateRequestType = "simple" | "full"; export const PcapsCreateRequestType = /*@__PURE__*/ S.String; export interface PcapsCreateRequestFilterV1MagicVisibilityPCAPsPCAPsRequestSimple { /** The destination IP address of the packet. */ destinationAddress?: string; /** The destination port of the packet. */ destinationPort?: number; /** The protocol number of the packet. */ protocol?: number; /** The source IP address of the packet. */ sourceAddress?: string; /** The source port of the packet. */ sourcePort?: number; } export const PcapsCreateRequestFilterV1MagicVisibilityPCAPsPCAPsRequestSimple = /*@__PURE__*/ S.suspend(() => S.Struct({ destinationAddress: S.optional( S.String.pipe(T.Body("destination_address")), ), destinationPort: S.optional(S.Number.pipe(T.Body("destination_port"))), protocol: S.optional(S.Number), sourceAddress: S.optional(S.String.pipe(T.Body("source_address"))), sourcePort: S.optional(S.Number.pipe(T.Body("source_port"))), }), ).annotate({ identifier: "PcapsCreateRequestFilterV1MagicVisibilityPCAPsPCAPsRequestSimple", }) as any as S.Schema; export interface CreatePcapRequest { /** Identifier. */ accountId: string; /** The limit of packets contained in a packet capture. */ packetLimit?: number; /** The system used to collect packet captures. */ system: PcapsCreateRequestSystem | (string & {}); /** The packet capture duration in seconds. */ timeLimit: number; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type: PcapsCreateRequestType | (string & {}); /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateRequestFilterV1MagicVisibilityPCAPsPCAPsRequestSimple; /** The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request. */ offsetTime?: string; /** The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to `full` packet captures. */ coloName?: string; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf?: string; /** The maximum number of bytes to capture. This field only applies to `full` packet captures. */ byteLimit?: number; } export const CreatePcapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), packetLimit: S.optional(S.Number.pipe(T.Body("packet_limit"))), system: PcapsCreateRequestSystem, timeLimit: S.Number.pipe(T.Body("time_limit")), type: PcapsCreateRequestType, filterV1: S.optional( PcapsCreateRequestFilterV1MagicVisibilityPCAPsPCAPsRequestSimple.pipe( T.Body("filter_v1"), ), ), offsetTime: S.optional(S.String.pipe(T.Body("offset_time"))), coloName: S.optional(S.String.pipe(T.Body("colo_name"))), destinationConf: S.optional(S.String.pipe(T.Body("destination_conf"))), byteLimit: S.optional(S.Number.pipe(T.Body("byte_limit"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/pcaps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePcapRequest", }) as any as S.Schema; export interface PcapsCreateResultPCAPFilterV1 { /** The destination IP address of the packet. */ destinationAddress?: string | null; /** The destination port of the packet. */ destinationPort?: number | null; /** The protocol number of the packet. */ protocol?: number | null; /** The source IP address of the packet. */ sourceAddress?: string | null; /** The source port of the packet. */ sourcePort?: number | null; } export const PcapsCreateResultPCAPFilterV1 = /*@__PURE__*/ S.suspend(() => S.Struct({ destinationAddress: S.optional( S.NullOr(S.String).pipe(T.Body("destination_address")), ), destinationPort: S.optional( S.NullOr(S.Number).pipe(T.Body("destination_port")), ), protocol: S.optional(S.NullOr(S.Number)), sourceAddress: S.optional( S.NullOr(S.String).pipe(T.Body("source_address")), ), sourcePort: S.optional(S.NullOr(S.Number).pipe(T.Body("source_port"))), }), ).annotate({ identifier: "PcapsCreateResultPCAPFilterV1", }) as any as S.Schema; export type PcapsCreateResultPCAPStatus = | "unknown" | "success" | "pending" | "running" | "conversion_pending" | "conversion_running" | "complete" | "failed"; export const PcapsCreateResultPCAPStatus = /*@__PURE__*/ S.String; export type PcapsCreateResultPCAPSystem = "magic-transit"; export const PcapsCreateResultPCAPSystem = /*@__PURE__*/ S.String; export type PcapsCreateResultPCAPType = "simple" | "full"; export const PcapsCreateResultPCAPType = /*@__PURE__*/ S.String; export interface PcapsCreateResultPCAP { /** The ID for the packet capture. */ id?: string | null; /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateResultPCAPFilterV1 | null; /** The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request. */ offsetTime?: string | null; /** The status of the packet capture request. */ status?: PcapsCreateResultPCAPStatus | null; /** The RFC 3339 timestamp when the packet capture was created. */ submitted?: string | null; /** The system used to collect packet captures. */ system?: PcapsCreateResultPCAPSystem | null; /** The packet capture duration in seconds. */ timeLimit?: number | null; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type?: PcapsCreateResultPCAPType | null; } export const PcapsCreateResultPCAP = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), filterV1: S.optional( S.NullOr(PcapsCreateResultPCAPFilterV1).pipe(T.Body("filter_v1")), ), offsetTime: S.optional(S.NullOr(S.String).pipe(T.Body("offset_time"))), status: S.optional(S.NullOr(PcapsCreateResultPCAPStatus)), submitted: S.optional(S.NullOr(S.String)), system: S.optional(S.NullOr(PcapsCreateResultPCAPSystem)), timeLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("time_limit"))), type: S.optional(S.NullOr(PcapsCreateResultPCAPType)), }), ).annotate({ identifier: "PcapsCreateResultPCAP", }) as any as S.Schema; export type PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullStatus = | "unknown" | "success" | "pending" | "running" | "conversion_pending" | "conversion_running" | "complete" | "failed"; export const PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullStatus = /*@__PURE__*/ S.String; export type PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullSystem = "magic-transit"; export const PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullSystem = /*@__PURE__*/ S.String; export type PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullType = | "simple" | "full"; export const PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullType = /*@__PURE__*/ S.String; export interface PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFull { /** The ID for the packet capture. */ id?: string | null; /** The maximum number of bytes to capture. This field only applies to `full` packet captures. */ byteLimit?: number | null; /** The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to `full` packet captures. */ coloName?: string | null; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf?: string | null; /** An error message that describes why the packet capture failed. This field only applies to `full` packet captures. */ errorMessage?: string | null; /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateResultPCAPFilterV1 | null; /** The number of packets captured. */ packetsCaptured?: number | null; /** The status of the packet capture request. */ status?: PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullStatus | null; /** The RFC 3339 timestamp when stopping the packet capture was requested. This field only applies to `full` packet captures. */ stopRequested?: string | null; /** The RFC 3339 timestamp when the packet capture was created. */ submitted?: string | null; /** The system used to collect packet captures. */ system?: PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullSystem | null; /** The packet capture duration in seconds. */ timeLimit?: number | null; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type?: PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullType | null; } export const PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFull = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), byteLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("byte_limit"))), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), destinationConf: S.optional( S.NullOr(S.String).pipe(T.Body("destination_conf")), ), errorMessage: S.optional( S.NullOr(S.String).pipe(T.Body("error_message")), ), filterV1: S.optional( S.NullOr(PcapsCreateResultPCAPFilterV1).pipe(T.Body("filter_v1")), ), packetsCaptured: S.optional( S.NullOr(S.Number).pipe(T.Body("packets_captured")), ), status: S.optional( S.NullOr(PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullStatus), ), stopRequested: S.optional( S.NullOr(S.String).pipe(T.Body("stop_requested")), ), submitted: S.optional(S.NullOr(S.String)), system: S.optional( S.NullOr(PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullSystem), ), timeLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("time_limit"))), type: S.optional( S.NullOr(PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFullType), ), }), ).annotate({ identifier: "PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFull", }) as any as S.Schema; export type PcapsCreateResult = | PcapsCreateResultPCAP | PcapsCreateResultMagicVisibilityPCAPsPCAPsResponseFull; export const PcapsCreateResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "filterV1", "offsetTime", "status", "submitted", "system", "timeLimit", "type", ], [ "id", "byteLimit", "coloName", "destinationConf", "errorMessage", "filterV1", "packetsCaptured", "status", "stopRequested", "submitted", "system", "timeLimit", "type", ], ]), ); export type CreatePcapResponse = PcapsCreateResult; export const CreatePcapResponse = /*@__PURE__*/ S.suspend(() => PcapsCreateResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "CreatePcapResponse", }) as any as S.Schema; export interface CreatePcapOwnershipRequest { /** Identifier. */ accountId: string; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf: string; } export const CreatePcapOwnershipRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), destinationConf: S.String.pipe(T.Body("destination_conf")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/pcaps/ownership", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePcapOwnershipRequest", }) as any as S.Schema; export type PcapsOwnershipCreateResponseStatus = | "pending" | "success" | "failed"; export const PcapsOwnershipCreateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreatePcapOwnershipResponse { /** The bucket ID associated with the packet captures API. */ id: string; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf: string; /** The ownership challenge filename stored in the bucket. */ filename: string; /** The status of the ownership challenge. Can be pending, success or failed. */ status: PcapsOwnershipCreateResponseStatus; /** The RFC 3339 timestamp when the bucket was added to packet captures API. */ submitted: string; /** The RFC 3339 timestamp when the bucket was validated. */ validated?: string | null; } export const CreatePcapOwnershipResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, destinationConf: S.String.pipe(T.Body("destination_conf")), filename: S.String, status: PcapsOwnershipCreateResponseStatus, submitted: S.String, validated: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePcapOwnershipResponse", }) as any as S.Schema; export type RoutesCreateRequestScopeColoNamesList = Array; export const RoutesCreateRequestScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesCreateRequestScopeColoRegionsList = Array; export const RoutesCreateRequestScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesCreateRequestScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesCreateRequestScopeColoNamesList; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesCreateRequestScopeColoRegionsList; } export const RoutesCreateRequestScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( RoutesCreateRequestScopeColoNamesList.pipe(T.Body("colo_names")), ), coloRegions: S.optional( RoutesCreateRequestScopeColoRegionsList.pipe(T.Body("colo_regions")), ), }), ).annotate({ identifier: "RoutesCreateRequestScope", }) as any as S.Schema; export interface CreateRouteRequest { /** Identifier */ accountId: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** An optional human provided description of the static route. */ description?: string; /** Used only for ECMP routes. */ scope?: RoutesCreateRequestScope; /** Optional weight of the ECMP scope - if provided. */ weight?: number; } export const CreateRouteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), nexthop: S.String, prefix: S.String, priority: S.Number, description: S.optional(S.String), scope: S.optional(RoutesCreateRequestScope), weight: S.optional(S.Number), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/routes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRouteRequest", }) as any as S.Schema; export type RoutesCreateResponseScopeColoNamesList = Array; export const RoutesCreateResponseScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesCreateResponseScopeColoRegionsList = Array; export const RoutesCreateResponseScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesCreateResponseScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesCreateResponseScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesCreateResponseScopeColoRegionsList | null; } export const RoutesCreateResponseScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( S.NullOr(RoutesCreateResponseScopeColoNamesList).pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( S.NullOr(RoutesCreateResponseScopeColoRegionsList).pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesCreateResponseScope", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateRouteResponse { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesCreateResponseScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const CreateRouteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional(S.NullOr(RoutesCreateResponseScope)), weight: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRouteResponse", }) as any as S.Schema; export interface SitesCreateRequestLocation { /** Latitude */ lat?: string; /** Longitude */ lon?: string; } export const SitesCreateRequestLocation = /*@__PURE__*/ S.suspend(() => S.Struct({ lat: S.optional(S.String), lon: S.optional(S.String), }), ).annotate({ identifier: "SitesCreateRequestLocation", }) as any as S.Schema; export interface CreateSiteRequest { /** Identifier */ accountId: string; /** The name of the site. */ name: string; /** Magic Connector identifier tag. */ connectorId?: string; description?: string; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean; /** Location of site in latitude and longitude. */ location?: SitesCreateRequestLocation; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string; } export const CreateSiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, connectorId: S.optional(S.String.pipe(T.Body("connector_id"))), description: S.optional(S.String), haMode: S.optional(S.Boolean.pipe(T.Body("ha_mode"))), location: S.optional(SitesCreateRequestLocation), secondaryConnectorId: S.optional( S.String.pipe(T.Body("secondary_connector_id")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/sites", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteRequest", }) as any as S.Schema; export interface SitesCreateResponseLocation { /** Latitude */ lat?: string | null; /** Longitude */ lon?: string | null; } export const SitesCreateResponseLocation = /*@__PURE__*/ S.suspend(() => S.Struct({ lat: S.optional(S.NullOr(S.String)), lon: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "SitesCreateResponseLocation", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSiteResponse { /** Identifier */ id?: string | null; /** Magic Connector identifier tag. */ connectorId?: string | null; description?: string | null; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean | null; /** Location of site in latitude and longitude. */ location?: SitesCreateResponseLocation | null; /** The name of the site. */ name?: string | null; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string | null; } export const CreateSiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), connectorId: S.optional(S.NullOr(S.String).pipe(T.Body("connector_id"))), description: S.optional(S.NullOr(S.String)), haMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_mode"))), location: S.optional(S.NullOr(SitesCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), secondaryConnectorId: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_connector_id")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteResponse", }) as any as S.Schema; export type SitesAclsCreateRequestLan1PortRangesList = Array; export const SitesAclsCreateRequestLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsCreateRequestLan1PortsList = Array; export const SitesAclsCreateRequestLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsCreateRequestLan1SubnetsList = Array; export const SitesAclsCreateRequestLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsCreateRequestLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsCreateRequestLan1PortRangesList; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsCreateRequestLan1PortsList; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsCreateRequestLan1SubnetsList; } export const SitesAclsCreateRequestLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.String.pipe(T.Body("lan_name"))), portRanges: S.optional( SitesAclsCreateRequestLan1PortRangesList.pipe(T.Body("port_ranges")), ), ports: S.optional(SitesAclsCreateRequestLan1PortsList), subnets: S.optional(SitesAclsCreateRequestLan1SubnetsList), }), ).annotate({ identifier: "SitesAclsCreateRequestLan1", }) as any as S.Schema; export type SitesAclsCreateRequestProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsCreateRequestProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsCreateRequestProtocolsList = Array< SitesAclsCreateRequestProtocolsItem | (string & {}) >; export const SitesAclsCreateRequestProtocolsList = /*@__PURE__*/ S.Array( SitesAclsCreateRequestProtocolsItem, ) as any as S.Schema; export interface CreateSiteAclRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; lan_1: SitesAclsCreateRequestLan1; lan_2: SitesAclsCreateRequestLan1; /** The name of the ACL. */ name: string; /** Description for the ACL. */ description?: string; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean; protocols?: SitesAclsCreateRequestProtocolsList; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean; } export const CreateSiteAclRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), lan_1: SitesAclsCreateRequestLan1, lan_2: SitesAclsCreateRequestLan1, name: S.String, description: S.optional(S.String), forwardLocally: S.optional(S.Boolean.pipe(T.Body("forward_locally"))), protocols: S.optional(SitesAclsCreateRequestProtocolsList), unidirectional: S.optional(S.Boolean), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/sites/{site_id}/acls", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteAclRequest", }) as any as S.Schema; export type SitesAclsCreateResponseLan1PortRangesList = Array; export const SitesAclsCreateResponseLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsCreateResponseLan1PortsList = Array; export const SitesAclsCreateResponseLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsCreateResponseLan1SubnetsList = Array; export const SitesAclsCreateResponseLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsCreateResponseLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string | null; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsCreateResponseLan1PortRangesList | null; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsCreateResponseLan1PortsList | null; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsCreateResponseLan1SubnetsList | null; } export const SitesAclsCreateResponseLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.NullOr(S.String).pipe(T.Body("lan_name"))), portRanges: S.optional( S.NullOr(SitesAclsCreateResponseLan1PortRangesList).pipe( T.Body("port_ranges"), ), ), ports: S.optional(S.NullOr(SitesAclsCreateResponseLan1PortsList)), subnets: S.optional(S.NullOr(SitesAclsCreateResponseLan1SubnetsList)), }), ).annotate({ identifier: "SitesAclsCreateResponseLan1", }) as any as S.Schema; export type SitesAclsCreateResponseProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsCreateResponseProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsCreateResponseProtocolsList = Array; export const SitesAclsCreateResponseProtocolsList = /*@__PURE__*/ S.Array( SitesAclsCreateResponseProtocolsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSiteAclResponse { /** Identifier */ id?: string | null; /** Description for the ACL. */ description?: string | null; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean | null; lan_1?: SitesAclsCreateResponseLan1 | null; lan_2?: SitesAclsCreateResponseLan1 | null; /** The name of the ACL. */ name?: string | null; protocols?: SitesAclsCreateResponseProtocolsList | null; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean | null; } export const CreateSiteAclResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), forwardLocally: S.optional( S.NullOr(S.Boolean).pipe(T.Body("forward_locally")), ), lan_1: S.optional(S.NullOr(SitesAclsCreateResponseLan1)), lan_2: S.optional(S.NullOr(SitesAclsCreateResponseLan1)), name: S.optional(S.NullOr(S.String)), protocols: S.optional(S.NullOr(SitesAclsCreateResponseProtocolsList)), unidirectional: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteAclResponse", }) as any as S.Schema; export interface SitesLansCreateRequestNat { /** A valid CIDR notation representing an IP range. */ staticPrefix?: string; } export const SitesLansCreateRequestNat = /*@__PURE__*/ S.suspend(() => S.Struct({ staticPrefix: S.optional(S.String.pipe(T.Body("static_prefix"))), }), ).annotate({ identifier: "SitesLansCreateRequestNat", }) as any as S.Schema; export interface SitesLansCreateRequestRoutedSubnetsItem { /** A valid IPv4 address. */ nextHop: string; /** A valid CIDR notation representing an IP range. */ prefix: string; nat?: SitesLansCreateRequestNat; } export const SitesLansCreateRequestRoutedSubnetsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ nextHop: S.String.pipe(T.Body("next_hop")), prefix: S.String, nat: S.optional(SitesLansCreateRequestNat), }), ).annotate({ identifier: "SitesLansCreateRequestRoutedSubnetsItem", }) as any as S.Schema; export type SitesLansCreateRequestRoutedSubnetsList = Array; export const SitesLansCreateRequestRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateRequestRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansCreateRequestStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansCreateRequestStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansCreateRequestStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansCreateRequestStaticAddressingDhcpRelayServerAddressesList; } export const SitesLansCreateRequestStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( SitesLansCreateRequestStaticAddressingDhcpRelayServerAddressesList.pipe( T.Body("server_addresses"), ), ), }), ).annotate({ identifier: "SitesLansCreateRequestStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: | SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItemType | (string & {}); /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansCreateRequestStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansCreateRequestStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansCreateRequestStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansCreateRequestStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansCreateRequestStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsList; /** A valid IPv4 address. */ dhcpPoolEnd?: string; /** A valid IPv4 address. */ dhcpPoolStart?: string; /** A valid IPv4 address. */ dnsServer?: string; dnsServers?: SitesLansCreateRequestStaticAddressingDhcpServerDnsServersList; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansCreateRequestStaticAddressingDhcpServerReservationsMap; } export const SitesLansCreateRequestStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( SitesLansCreateRequestStaticAddressingDhcpServerDhcpOptionsList.pipe( T.Body("dhcp_options"), ), ), dhcpPoolEnd: S.optional(S.String.pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional(S.String.pipe(T.Body("dhcp_pool_start"))), dnsServer: S.optional(S.String.pipe(T.Body("dns_server"))), dnsServers: S.optional( SitesLansCreateRequestStaticAddressingDhcpServerDnsServersList.pipe( T.Body("dns_servers"), ), ), reservations: S.optional( SitesLansCreateRequestStaticAddressingDhcpServerReservationsMap, ), }), ).annotate({ identifier: "SitesLansCreateRequestStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansCreateRequestStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansCreateRequestStaticAddressingDhcpRelay; dhcpServer?: SitesLansCreateRequestStaticAddressingDhcpServer; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string; } export const SitesLansCreateRequestStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( SitesLansCreateRequestStaticAddressingDhcpRelay.pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( SitesLansCreateRequestStaticAddressingDhcpServer.pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional(S.String.pipe(T.Body("secondary_address"))), virtualAddress: S.optional(S.String.pipe(T.Body("virtual_address"))), }), ).annotate({ identifier: "SitesLansCreateRequestStaticAddressing", }) as any as S.Schema; export interface CreateSiteLanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; bondId?: number; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean; name?: string; nat?: SitesLansCreateRequestNat; physport?: number; routedSubnets?: SitesLansCreateRequestRoutedSubnetsList; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansCreateRequestStaticAddressing; /** VLAN ID. Use zero for untagged. */ vlanTag?: number; } export const CreateSiteLanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), bondId: S.optional(S.Number.pipe(T.Body("bond_id"))), haLink: S.optional(S.Boolean.pipe(T.Body("ha_link"))), isBreakout: S.optional(S.Boolean.pipe(T.Body("is_breakout"))), isPrioritized: S.optional(S.Boolean.pipe(T.Body("is_prioritized"))), name: S.optional(S.String), nat: S.optional(SitesLansCreateRequestNat), physport: S.optional(S.Number), routedSubnets: S.optional( SitesLansCreateRequestRoutedSubnetsList.pipe(T.Body("routed_subnets")), ), staticAddressing: S.optional( SitesLansCreateRequestStaticAddressing.pipe(T.Body("static_addressing")), ), vlanTag: S.optional(S.Number.pipe(T.Body("vlan_tag"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/sites/{site_id}/lans", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteLanRequest", }) as any as S.Schema; export interface SitesLansCreateResultItemNat { /** A valid CIDR notation representing an IP range. */ staticPrefix?: string | null; } export const SitesLansCreateResultItemNat = /*@__PURE__*/ S.suspend(() => S.Struct({ staticPrefix: S.optional(S.NullOr(S.String).pipe(T.Body("static_prefix"))), }), ).annotate({ identifier: "SitesLansCreateResultItemNat", }) as any as S.Schema; export interface SitesLansCreateResultItemRoutedSubnetsItem { /** A valid IPv4 address. */ nextHop: string; /** A valid CIDR notation representing an IP range. */ prefix: string; nat?: SitesLansCreateResultItemNat | null; } export const SitesLansCreateResultItemRoutedSubnetsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ nextHop: S.String.pipe(T.Body("next_hop")), prefix: S.String, nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), }), ).annotate({ identifier: "SitesLansCreateResultItemRoutedSubnetsItem", }) as any as S.Schema; export type SitesLansCreateResultItemRoutedSubnetsList = Array; export const SitesLansCreateResultItemRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansCreateResultItemStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansCreateResultItemStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansCreateResultItemStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansCreateResultItemStaticAddressingDhcpRelayServerAddressesList | null; } export const SitesLansCreateResultItemStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( S.NullOr( SitesLansCreateResultItemStaticAddressingDhcpRelayServerAddressesList, ).pipe(T.Body("server_addresses")), ), }), ).annotate({ identifier: "SitesLansCreateResultItemStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItemType; /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansCreateResultItemStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansCreateResultItemStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansCreateResultItemStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined }; export const SitesLansCreateResultItemStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansCreateResultItemStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsList | null; /** A valid IPv4 address. */ dhcpPoolEnd?: string | null; /** A valid IPv4 address. */ dhcpPoolStart?: string | null; /** A valid IPv4 address. */ dnsServer?: string | null; dnsServers?: SitesLansCreateResultItemStaticAddressingDhcpServerDnsServersList | null; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansCreateResultItemStaticAddressingDhcpServerReservationsMap | null; } export const SitesLansCreateResultItemStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( S.NullOr( SitesLansCreateResultItemStaticAddressingDhcpServerDhcpOptionsList, ).pipe(T.Body("dhcp_options")), ), dhcpPoolEnd: S.optional(S.NullOr(S.String).pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional( S.NullOr(S.String).pipe(T.Body("dhcp_pool_start")), ), dnsServer: S.optional(S.NullOr(S.String).pipe(T.Body("dns_server"))), dnsServers: S.optional( S.NullOr( SitesLansCreateResultItemStaticAddressingDhcpServerDnsServersList, ).pipe(T.Body("dns_servers")), ), reservations: S.optional( S.NullOr( SitesLansCreateResultItemStaticAddressingDhcpServerReservationsMap, ), ), }), ).annotate({ identifier: "SitesLansCreateResultItemStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansCreateResultItemStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansCreateResultItemStaticAddressingDhcpRelay | null; dhcpServer?: SitesLansCreateResultItemStaticAddressingDhcpServer | null; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string | null; } export const SitesLansCreateResultItemStaticAddressing = /*@__PURE__*/ S.suspend(() => S.Struct({ address: S.String, dhcpRelay: S.optional( S.NullOr(SitesLansCreateResultItemStaticAddressingDhcpRelay).pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( S.NullOr(SitesLansCreateResultItemStaticAddressingDhcpServer).pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), virtualAddress: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_address")), ), }), ).annotate({ identifier: "SitesLansCreateResultItemStaticAddressing", }) as any as S.Schema; export interface SitesLansCreateResultItem { /** Identifier */ id?: string | null; bondId?: number | null; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean | null; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean | null; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean | null; name?: string | null; nat?: SitesLansCreateResultItemNat | null; physport?: number | null; routedSubnets?: SitesLansCreateResultItemRoutedSubnetsList | null; /** Identifier */ siteId?: string | null; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const SitesLansCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), bondId: S.optional(S.NullOr(S.Number).pipe(T.Body("bond_id"))), haLink: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_link"))), isBreakout: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_breakout"))), isPrioritized: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_prioritized")), ), name: S.optional(S.NullOr(S.String)), nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), physport: S.optional(S.NullOr(S.Number)), routedSubnets: S.optional( S.NullOr(SitesLansCreateResultItemRoutedSubnetsList).pipe( T.Body("routed_subnets"), ), ), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesLansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }), ).annotate({ identifier: "SitesLansCreateResultItem", }) as any as S.Schema; export type SitesLansCreateResultList = Array; export const SitesLansCreateResultList = /*@__PURE__*/ S.Array( SitesLansCreateResultItem, ) as any as S.Schema; export interface CreateSiteLanResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SitesLansCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const CreateSiteLanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SitesLansCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteLanResponse", }) as any as S.Schema; export type CreateSitesAppConfigurationRequestPreferredWansList = Array; export const CreateSitesAppConfigurationRequestPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateSitesAppConfigurationRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Magic account app ID. */ accountAppId?: string; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: CreateSitesAppConfigurationRequestPreferredWansList; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number; /** Managed app ID. */ managedAppId?: string; } export const CreateSitesAppConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), accountAppId: S.optional(S.String.pipe(T.Body("account_app_id"))), breakout: S.optional(S.Boolean), preferredWans: S.optional( CreateSitesAppConfigurationRequestPreferredWansList.pipe( T.Body("preferred_wans"), ), ), priority: S.optional(S.Number), managedAppId: S.optional(S.String.pipe(T.Body("managed_app_id"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/sites/{site_id}/app_configs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSitesAppConfigurationRequest", }) as any as S.Schema; export type CreateSitesAppConfigurationResultAccountAppPreferredWansList = Array; export const CreateSitesAppConfigurationResultAccountAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateSitesAppConfigurationResultAccountApp { /** Magic account app ID. */ accountAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: CreateSitesAppConfigurationResultAccountAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const CreateSitesAppConfigurationResultAccountApp = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( CreateSitesAppConfigurationResultAccountAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "CreateSitesAppConfigurationResultAccountApp", }) as any as S.Schema; export type CreateSitesAppConfigurationResultManagedAppPreferredWansList = Array; export const CreateSitesAppConfigurationResultManagedAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateSitesAppConfigurationResultManagedApp { /** Managed app ID. */ managedAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: CreateSitesAppConfigurationResultManagedAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const CreateSitesAppConfigurationResultManagedApp = /*@__PURE__*/ S.suspend(() => S.Struct({ managedAppId: S.String.pipe(T.Body("managed_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( CreateSitesAppConfigurationResultManagedAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "CreateSitesAppConfigurationResultManagedApp", }) as any as S.Schema; export type CreateSitesAppConfigurationResult = | CreateSitesAppConfigurationResultAccountApp | CreateSitesAppConfigurationResultManagedApp; export const CreateSitesAppConfigurationResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accountAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ["managedAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ]), ); export type CreateSitesAppConfigurationResponse = CreateSitesAppConfigurationResult; export const CreateSitesAppConfigurationResponse = /*@__PURE__*/ S.suspend(() => CreateSitesAppConfigurationResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "CreateSitesAppConfigurationResponse", }) as any as S.Schema; export interface SitesWansCreateRequestStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; /** A valid IPv4 address. */ gatewayAddress: string; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string; } export const SitesWansCreateRequestStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, gatewayAddress: S.String.pipe(T.Body("gateway_address")), secondaryAddress: S.optional(S.String.pipe(T.Body("secondary_address"))), }), ).annotate({ identifier: "SitesWansCreateRequestStaticAddressing", }) as any as S.Schema; export interface CreateSiteWanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; physport: number; name?: string; priority?: number; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateRequestStaticAddressing; /** VLAN ID. Use zero for untagged. */ vlanTag?: number; } export const CreateSiteWanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), physport: S.Number, name: S.optional(S.String), priority: S.optional(S.Number), staticAddressing: S.optional( SitesWansCreateRequestStaticAddressing.pipe(T.Body("static_addressing")), ), vlanTag: S.optional(S.Number.pipe(T.Body("vlan_tag"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/sites/{site_id}/wans", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteWanRequest", }) as any as S.Schema; export type SitesWansCreateResultItemHealthCheckRate = "low" | "mid" | "high"; export const SitesWansCreateResultItemHealthCheckRate = /*@__PURE__*/ S.String; export interface SitesWansCreateResultItemStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; /** A valid IPv4 address. */ gatewayAddress: string; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; } export const SitesWansCreateResultItemStaticAddressing = /*@__PURE__*/ S.suspend(() => S.Struct({ address: S.String, gatewayAddress: S.String.pipe(T.Body("gateway_address")), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), }), ).annotate({ identifier: "SitesWansCreateResultItemStaticAddressing", }) as any as S.Schema; export interface SitesWansCreateResultItem { /** Identifier */ id?: string | null; /** Magic WAN health check rate for tunnels created on this link. The default value is `mid`. */ healthCheckRate?: SitesWansCreateResultItemHealthCheckRate | null; name?: string | null; physport?: number | null; /** Priority of WAN for traffic loadbalancing. */ priority?: number | null; /** Identifier */ siteId?: string | null; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const SitesWansCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), healthCheckRate: S.optional( S.NullOr(SitesWansCreateResultItemHealthCheckRate).pipe( T.Body("health_check_rate"), ), ), name: S.optional(S.NullOr(S.String)), physport: S.optional(S.NullOr(S.Number)), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesWansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }), ).annotate({ identifier: "SitesWansCreateResultItem", }) as any as S.Schema; export type SitesWansCreateResultList = Array; export const SitesWansCreateResultList = /*@__PURE__*/ S.Array( SitesWansCreateResultItem, ) as any as S.Schema; export interface CreateSiteWanResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SitesWansCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const CreateSiteWanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SitesWansCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSiteWanResponse", }) as any as S.Schema; export interface DeleteAppRequest { /** Identifier */ accountId: string; /** Identifier */ accountAppId: string; } export const DeleteAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), accountAppId: S.String.pipe(T.Label("account_app_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/apps/{account_app_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAppRequest", }) as any as S.Schema; export type AppsDeleteResponseHostnamesList = Array; export const AppsDeleteResponseHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsDeleteResponseIpSubnetsList = Array; export const AppsDeleteResponseIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsDeleteResponseSourceSubnetsList = Array; export const AppsDeleteResponseSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteAppResponse { /** Magic account app ID. */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsDeleteResponseHostnamesList | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsDeleteResponseIpSubnetsList | null; /** Display name for the app. */ name?: string | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsDeleteResponseSourceSubnetsList | null; /** Category of the app. */ type?: string | null; } export const DeleteAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), hostnames: S.optional(S.NullOr(AppsDeleteResponseHostnamesList)), ipSubnets: S.optional( S.NullOr(AppsDeleteResponseIpSubnetsList).pipe(T.Body("ip_subnets")), ), name: S.optional(S.NullOr(S.String)), sourceSubnets: S.optional( S.NullOr(AppsDeleteResponseSourceSubnetsList).pipe( T.Body("source_subnets"), ), ), type: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAppResponse", }) as any as S.Schema; export interface DeleteCf1SiteRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; } export const DeleteCf1SiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCf1SiteRequest", }) as any as S.Schema; export type Cf1SitesDeleteResponseLocation = Cf1SitesCreateResultItemLocation; export const Cf1SitesDeleteResponseLocation = Cf1SitesCreateResultItemLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteCf1SiteResponse { /** A human-provided name describing the CF1 Site that should be unique within the account. */ name: string; /** Identifier */ id?: string | null; createdOn?: string | null; /** A human-provided description of the CF1 Site. */ description?: string | null; location?: Cf1SitesCreateResultItemLocation | null; modifiedOn?: string | null; } export const DeleteCf1SiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), location: S.optional(S.NullOr(Cf1SitesCreateResultItemLocation)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCf1SiteResponse", }) as any as S.Schema; export interface DeleteCf1SiteRampRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; /** Identifier */ rampId: string; } export const DeleteCf1SiteRampRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), rampId: S.String.pipe(T.Label("ramp_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps/{ramp_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCf1SiteRampRequest", }) as any as S.Schema; export type Cf1SitesRampsDeleteResponseType = | "gre" | "gre_interconnect" | "mpls_interconnect" | "mconn" | "ipsec"; export const Cf1SitesRampsDeleteResponseType = /*@__PURE__*/ S.String; export type Cf1SitesRampsDeleteResponseGre = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsDeleteResponseGre = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsDeleteResponseGreInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsDeleteResponseGreInterconnect = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsDeleteResponseIpsec = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsDeleteResponseIpsec = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsDeleteResponseMconn = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsDeleteResponseMconn = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsDeleteResponseMplsInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsDeleteResponseMplsInterconnect = Cf1SitesRampsCreateResultItemGre; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteCf1SiteRampResponse { /** Identifier */ id: string; createdOn: string; modifiedOn: string; /** A human-provided name describing the ramp that should be unique within the CF1 Site. */ name: string; /** The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. */ type: Cf1SitesRampsDeleteResponseType; /** A human-provided description of the ramp. */ description?: string | null; gre?: Cf1SitesRampsCreateResultItemGre | null; greInterconnect?: Cf1SitesRampsCreateResultItemGre | null; ipsec?: Cf1SitesRampsCreateResultItemGre | null; mconn?: Cf1SitesRampsCreateResultItemGre | null; mplsInterconnect?: Cf1SitesRampsCreateResultItemGre | null; } export const DeleteCf1SiteRampResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, type: Cf1SitesRampsDeleteResponseType, description: S.optional(S.NullOr(S.String)), gre: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), greInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("gre_interconnect"), ), ), ipsec: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mconn: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mplsInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("mpls_interconnect"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCf1SiteRampResponse", }) as any as S.Schema; export interface DeleteConnectorRequest { /** Account identifier */ accountId: string; connectorId: string; } export const DeleteConnectorRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/connectors/{connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteConnectorRequest", }) as any as S.Schema; export type ConnectorsDeleteResponseInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsDeleteResponseInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsDeleteResponseInterruptWindowDaysOfWeekList = Array; export const ConnectorsDeleteResponseInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsDeleteResponseInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsDeleteResponseInterruptWindowEmbargoDatesList = Array; export const ConnectorsDeleteResponseInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConnectorsDeleteResponseDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsDeleteResponseDeviceType = /*@__PURE__*/ S.String; export interface ConnectorsDeleteResponseDevice { id: string; serialNumber?: string | null; type?: ConnectorsDeleteResponseDeviceType | null; } export const ConnectorsDeleteResponseDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), type: S.optional(S.NullOr(ConnectorsDeleteResponseDeviceType)), }), ).annotate({ identifier: "ConnectorsDeleteResponseDevice", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteConnectorResponse { id: string; activated: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek: ConnectorsDeleteResponseInterruptWindowDaysOfWeekList; interruptWindowDurationHours: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates: ConnectorsDeleteResponseInterruptWindowEmbargoDatesList; interruptWindowHourOfDay: number; lastUpdated: string; notes: string; primary: boolean; timezone: string; device?: ConnectorsDeleteResponseDevice | null; lastHeartbeat?: string | null; lastSeenVersion?: string | null; licenseKey?: string | null; siteId?: string | null; } export const DeleteConnectorResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, activated: S.Boolean, interruptWindowDaysOfWeek: ConnectorsDeleteResponseInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), interruptWindowDurationHours: S.Number.pipe( T.Body("interrupt_window_duration_hours"), ), interruptWindowEmbargoDates: ConnectorsDeleteResponseInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), interruptWindowHourOfDay: S.Number.pipe( T.Body("interrupt_window_hour_of_day"), ), lastUpdated: S.String.pipe(T.Body("last_updated")), notes: S.String, primary: S.Boolean, timezone: S.String, device: S.optional(S.NullOr(ConnectorsDeleteResponseDevice)), lastHeartbeat: S.optional( S.NullOr(S.String).pipe(T.Body("last_heartbeat")), ), lastSeenVersion: S.optional( S.NullOr(S.String).pipe(T.Body("last_seen_version")), ), licenseKey: S.optional(S.NullOr(S.String).pipe(T.Body("license_key"))), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteConnectorResponse", }) as any as S.Schema; export interface DeleteGreTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ greTunnelId: string; xMagicNewHcTarget?: boolean; } export const DeleteGreTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), greTunnelId: S.String.pipe(T.Label("gre_tunnel_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteGreTunnelRequest", }) as any as S.Schema; export type GreTunnelsDeleteResponseDeletedGreTunnelBgpExtraPrefixesList = Array; export const GreTunnelsDeleteResponseDeletedGreTunnelBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsDeleteResponseDeletedGreTunnelBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsDeleteResponseDeletedGreTunnelBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const GreTunnelsDeleteResponseDeletedGreTunnelBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( GreTunnelsDeleteResponseDeletedGreTunnelBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsDeleteResponseDeletedGreTunnelBgp", }) as any as S.Schema; export type GreTunnelsDeleteResponseDeletedGreTunnelBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const GreTunnelsDeleteResponseDeletedGreTunnelBgpStatusState = /*@__PURE__*/ S.String; export interface GreTunnelsDeleteResponseDeletedGreTunnelBgpStatus { state: GreTunnelsDeleteResponseDeletedGreTunnelBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const GreTunnelsDeleteResponseDeletedGreTunnelBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: GreTunnelsDeleteResponseDeletedGreTunnelBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "GreTunnelsDeleteResponseDeletedGreTunnelBgpStatus", }) as any as S.Schema; export type GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckRate = | "low" | "mid" | "high"; export const GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckType = | "reply" | "request"; export const GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsDeleteResponseDeletedGreTunnelHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckType | null; } export const GreTunnelsDeleteResponseDeletedGreTunnelHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckRate), ), target: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckTarget), ), type: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelHealthCheckType), ), }), ).annotate({ identifier: "GreTunnelsDeleteResponseDeletedGreTunnelHealthCheck", }) as any as S.Schema; export interface GreTunnelsDeleteResponseDeletedGreTunnel { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: GreTunnelsDeleteResponseDeletedGreTunnelBgp | null; bgpStatus?: GreTunnelsDeleteResponseDeletedGreTunnelBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the GRE tunnel. */ description?: string | null; healthCheck?: GreTunnelsDeleteResponseDeletedGreTunnelHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number | null; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number | null; } export const GreTunnelsDeleteResponseDeletedGreTunnel = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelBgp)), bgpStatus: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnelHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "GreTunnelsDeleteResponseDeletedGreTunnel", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteGreTunnelResponse { deleted?: boolean | null; deletedGreTunnel?: GreTunnelsDeleteResponseDeletedGreTunnel | null; } export const DeleteGreTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ deleted: S.optional(S.NullOr(S.Boolean)), deletedGreTunnel: S.optional( S.NullOr(GreTunnelsDeleteResponseDeletedGreTunnel).pipe( T.Body("deleted_gre_tunnel"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteGreTunnelResponse", }) as any as S.Schema; export interface DeleteIpsecTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ ipsecTunnelId: string; xMagicNewHcTarget?: boolean; } export const DeleteIpsecTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ipsecTunnelId: S.String.pipe(T.Label("ipsec_tunnel_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteIpsecTunnelRequest", }) as any as S.Schema; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpExtraPrefixesList = Array; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgp", }) as any as S.Schema; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatusState = /*@__PURE__*/ S.String; export interface IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatus { state: IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatus", }) as any as S.Schema; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckRate = | "low" | "mid" | "high"; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckType = | "reply" | "request"; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckType | null; } export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr( IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckDirection, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckRate), ), target: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckTarget), ), type: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheckType), ), }), ).annotate({ identifier: "IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheck", }) as any as S.Schema; export type IpsecTunnelsDeleteResponseDeletedIpsecTunnelPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsDeleteResponseDeletedIpsecTunnelPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export interface IpsecTunnelsDeleteResponseDeletedIpsecTunnel { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel (Phase 2). */ allowNullCipher?: boolean | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgp | null; bgpStatus?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; customRemoteIdentities?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities | null; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string | null; /** An optional description forthe IPsec tunnel. */ description?: string | null; healthCheck?: IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean | null; } export const IpsecTunnelsDeleteResponseDeletedIpsecTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, allowNullCipher: S.optional( S.NullOr(S.Boolean).pipe(T.Body("allow_null_cipher")), ), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgp), ), bgpStatus: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnelBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), customRemoteIdentities: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities, ).pipe(T.Body("custom_remote_identities")), ), customerEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("customer_endpoint")), ), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnelHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), replayProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("replay_protection")), ), }), ).annotate({ identifier: "IpsecTunnelsDeleteResponseDeletedIpsecTunnel", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteIpsecTunnelResponse { deleted?: boolean | null; deletedIpsecTunnel?: IpsecTunnelsDeleteResponseDeletedIpsecTunnel | null; } export const DeleteIpsecTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ deleted: S.optional(S.NullOr(S.Boolean)), deletedIpsecTunnel: S.optional( S.NullOr(IpsecTunnelsDeleteResponseDeletedIpsecTunnel).pipe( T.Body("deleted_ipsec_tunnel"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteIpsecTunnelResponse", }) as any as S.Schema; export interface DeletePcapOwnershipRequest { /** Identifier. */ accountId: string; /** Identifier. */ ownershipId: string; } export const DeletePcapOwnershipRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ownershipId: S.String.pipe(T.Label("ownership_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/pcaps/ownership/{ownership_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePcapOwnershipRequest", }) as any as S.Schema; export interface DeletePcapOwnershipResponse {} export const DeletePcapOwnershipResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePcapOwnershipResponse", }) as any as S.Schema; export interface DeleteRouteRequest { /** Identifier */ accountId: string; /** Identifier */ routeId: string; } export const DeleteRouteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), routeId: S.String.pipe(T.Label("route_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/routes/{route_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRouteRequest", }) as any as S.Schema; export type RoutesDeleteResponseDeletedRouteScopeColoNamesList = Array; export const RoutesDeleteResponseDeletedRouteScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesDeleteResponseDeletedRouteScopeColoRegionsList = Array; export const RoutesDeleteResponseDeletedRouteScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesDeleteResponseDeletedRouteScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesDeleteResponseDeletedRouteScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesDeleteResponseDeletedRouteScopeColoRegionsList | null; } export const RoutesDeleteResponseDeletedRouteScope = /*@__PURE__*/ S.suspend( () => S.Struct({ coloNames: S.optional( S.NullOr(RoutesDeleteResponseDeletedRouteScopeColoNamesList).pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( S.NullOr(RoutesDeleteResponseDeletedRouteScopeColoRegionsList).pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesDeleteResponseDeletedRouteScope", }) as any as S.Schema; export interface RoutesDeleteResponseDeletedRoute { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesDeleteResponseDeletedRouteScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const RoutesDeleteResponseDeletedRoute = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional(S.NullOr(RoutesDeleteResponseDeletedRouteScope)), weight: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RoutesDeleteResponseDeletedRoute", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteRouteResponse { deleted?: boolean | null; deletedRoute?: RoutesDeleteResponseDeletedRoute | null; } export const DeleteRouteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ deleted: S.optional(S.NullOr(S.Boolean)), deletedRoute: S.optional( S.NullOr(RoutesDeleteResponseDeletedRoute).pipe(T.Body("deleted_route")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRouteResponse", }) as any as S.Schema; export interface DeleteSiteRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; } export const DeleteSiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/sites/{site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteRequest", }) as any as S.Schema; export type SitesDeleteResponseLocation = SitesCreateResponseLocation; export const SitesDeleteResponseLocation = SitesCreateResponseLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSiteResponse { /** Identifier */ id?: string | null; /** Magic Connector identifier tag. */ connectorId?: string | null; description?: string | null; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean | null; /** Location of site in latitude and longitude. */ location?: SitesCreateResponseLocation | null; /** The name of the site. */ name?: string | null; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string | null; } export const DeleteSiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), connectorId: S.optional(S.NullOr(S.String).pipe(T.Body("connector_id"))), description: S.optional(S.NullOr(S.String)), haMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_mode"))), location: S.optional(S.NullOr(SitesCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), secondaryConnectorId: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_connector_id")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteResponse", }) as any as S.Schema; export interface DeleteSiteAclRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ aclId: string; } export const DeleteSiteAclRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), aclId: S.String.pipe(T.Label("acl_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteAclRequest", }) as any as S.Schema; export type SitesAclsDeleteResponseLan1PortRangesList = Array; export const SitesAclsDeleteResponseLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsDeleteResponseLan1PortsList = Array; export const SitesAclsDeleteResponseLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsDeleteResponseLan1SubnetsList = Array; export const SitesAclsDeleteResponseLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsDeleteResponseLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string | null; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsDeleteResponseLan1PortRangesList | null; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsDeleteResponseLan1PortsList | null; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsDeleteResponseLan1SubnetsList | null; } export const SitesAclsDeleteResponseLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.NullOr(S.String).pipe(T.Body("lan_name"))), portRanges: S.optional( S.NullOr(SitesAclsDeleteResponseLan1PortRangesList).pipe( T.Body("port_ranges"), ), ), ports: S.optional(S.NullOr(SitesAclsDeleteResponseLan1PortsList)), subnets: S.optional(S.NullOr(SitesAclsDeleteResponseLan1SubnetsList)), }), ).annotate({ identifier: "SitesAclsDeleteResponseLan1", }) as any as S.Schema; export type SitesAclsDeleteResponseProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsDeleteResponseProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsDeleteResponseProtocolsList = Array; export const SitesAclsDeleteResponseProtocolsList = /*@__PURE__*/ S.Array( SitesAclsDeleteResponseProtocolsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSiteAclResponse { /** Identifier */ id?: string | null; /** Description for the ACL. */ description?: string | null; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean | null; lan_1?: SitesAclsDeleteResponseLan1 | null; lan_2?: SitesAclsDeleteResponseLan1 | null; /** The name of the ACL. */ name?: string | null; protocols?: SitesAclsDeleteResponseProtocolsList | null; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean | null; } export const DeleteSiteAclResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), forwardLocally: S.optional( S.NullOr(S.Boolean).pipe(T.Body("forward_locally")), ), lan_1: S.optional(S.NullOr(SitesAclsDeleteResponseLan1)), lan_2: S.optional(S.NullOr(SitesAclsDeleteResponseLan1)), name: S.optional(S.NullOr(S.String)), protocols: S.optional(S.NullOr(SitesAclsDeleteResponseProtocolsList)), unidirectional: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteAclResponse", }) as any as S.Schema; export interface DeleteSiteLanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ lanId: string; } export const DeleteSiteLanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), lanId: S.String.pipe(T.Label("lan_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteLanRequest", }) as any as S.Schema; export type SitesLansDeleteResponseNat = SitesLansCreateResultItemNat; export const SitesLansDeleteResponseNat = SitesLansCreateResultItemNat; export type SitesLansDeleteResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export const SitesLansDeleteResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export type SitesLansDeleteResponseRoutedSubnetsList = Array; export const SitesLansDeleteResponseRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansDeleteResponseStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansDeleteResponseStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansDeleteResponseStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansDeleteResponseStaticAddressingDhcpRelayServerAddressesList | null; } export const SitesLansDeleteResponseStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( S.NullOr( SitesLansDeleteResponseStaticAddressingDhcpRelayServerAddressesList, ).pipe(T.Body("server_addresses")), ), }), ).annotate({ identifier: "SitesLansDeleteResponseStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItemType; /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansDeleteResponseStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansDeleteResponseStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansDeleteResponseStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansDeleteResponseStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansDeleteResponseStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsList | null; /** A valid IPv4 address. */ dhcpPoolEnd?: string | null; /** A valid IPv4 address. */ dhcpPoolStart?: string | null; /** A valid IPv4 address. */ dnsServer?: string | null; dnsServers?: SitesLansDeleteResponseStaticAddressingDhcpServerDnsServersList | null; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansDeleteResponseStaticAddressingDhcpServerReservationsMap | null; } export const SitesLansDeleteResponseStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( S.NullOr( SitesLansDeleteResponseStaticAddressingDhcpServerDhcpOptionsList, ).pipe(T.Body("dhcp_options")), ), dhcpPoolEnd: S.optional(S.NullOr(S.String).pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional( S.NullOr(S.String).pipe(T.Body("dhcp_pool_start")), ), dnsServer: S.optional(S.NullOr(S.String).pipe(T.Body("dns_server"))), dnsServers: S.optional( S.NullOr( SitesLansDeleteResponseStaticAddressingDhcpServerDnsServersList, ).pipe(T.Body("dns_servers")), ), reservations: S.optional( S.NullOr( SitesLansDeleteResponseStaticAddressingDhcpServerReservationsMap, ), ), }), ).annotate({ identifier: "SitesLansDeleteResponseStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansDeleteResponseStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansDeleteResponseStaticAddressingDhcpRelay | null; dhcpServer?: SitesLansDeleteResponseStaticAddressingDhcpServer | null; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string | null; } export const SitesLansDeleteResponseStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( S.NullOr(SitesLansDeleteResponseStaticAddressingDhcpRelay).pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( S.NullOr(SitesLansDeleteResponseStaticAddressingDhcpServer).pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), virtualAddress: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_address")), ), }), ).annotate({ identifier: "SitesLansDeleteResponseStaticAddressing", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSiteLanResponse { /** Identifier */ id?: string | null; bondId?: number | null; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean | null; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean | null; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean | null; name?: string | null; nat?: SitesLansCreateResultItemNat | null; physport?: number | null; routedSubnets?: SitesLansDeleteResponseRoutedSubnetsList | null; /** Identifier */ siteId?: string | null; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansDeleteResponseStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const DeleteSiteLanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), bondId: S.optional(S.NullOr(S.Number).pipe(T.Body("bond_id"))), haLink: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_link"))), isBreakout: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_breakout"))), isPrioritized: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_prioritized")), ), name: S.optional(S.NullOr(S.String)), nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), physport: S.optional(S.NullOr(S.Number)), routedSubnets: S.optional( S.NullOr(SitesLansDeleteResponseRoutedSubnetsList).pipe( T.Body("routed_subnets"), ), ), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesLansDeleteResponseStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteLanResponse", }) as any as S.Schema; export interface DeleteSitesAppConfigurationRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ appConfigId: string; } export const DeleteSitesAppConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), appConfigId: S.String.pipe(T.Label("app_config_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSitesAppConfigurationRequest", }) as any as S.Schema; export type DeleteSitesAppConfigurationResultAccountAppPreferredWansList = Array; export const DeleteSitesAppConfigurationResultAccountAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DeleteSitesAppConfigurationResultAccountApp { /** Magic account app ID. */ accountAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: DeleteSitesAppConfigurationResultAccountAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const DeleteSitesAppConfigurationResultAccountApp = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( DeleteSitesAppConfigurationResultAccountAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "DeleteSitesAppConfigurationResultAccountApp", }) as any as S.Schema; export type DeleteSitesAppConfigurationResultManagedAppPreferredWansList = Array; export const DeleteSitesAppConfigurationResultManagedAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DeleteSitesAppConfigurationResultManagedApp { /** Managed app ID. */ managedAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: DeleteSitesAppConfigurationResultManagedAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const DeleteSitesAppConfigurationResultManagedApp = /*@__PURE__*/ S.suspend(() => S.Struct({ managedAppId: S.String.pipe(T.Body("managed_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( DeleteSitesAppConfigurationResultManagedAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "DeleteSitesAppConfigurationResultManagedApp", }) as any as S.Schema; export type DeleteSitesAppConfigurationResult = | DeleteSitesAppConfigurationResultAccountApp | DeleteSitesAppConfigurationResultManagedApp; export const DeleteSitesAppConfigurationResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accountAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ["managedAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ]), ); export type DeleteSitesAppConfigurationResponse = DeleteSitesAppConfigurationResult; export const DeleteSitesAppConfigurationResponse = /*@__PURE__*/ S.suspend(() => DeleteSitesAppConfigurationResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "DeleteSitesAppConfigurationResponse", }) as any as S.Schema; export interface DeleteSiteWanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ wanId: string; } export const DeleteSiteWanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), wanId: S.String.pipe(T.Label("wan_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteWanRequest", }) as any as S.Schema; export type SitesWansDeleteResponseHealthCheckRate = "low" | "mid" | "high"; export const SitesWansDeleteResponseHealthCheckRate = /*@__PURE__*/ S.String; export type SitesWansDeleteResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; export const SitesWansDeleteResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSiteWanResponse { /** Identifier */ id?: string | null; /** Magic WAN health check rate for tunnels created on this link. The default value is `mid`. */ healthCheckRate?: SitesWansDeleteResponseHealthCheckRate | null; name?: string | null; physport?: number | null; /** Priority of WAN for traffic loadbalancing. */ priority?: number | null; /** Identifier */ siteId?: string | null; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const DeleteSiteWanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), healthCheckRate: S.optional( S.NullOr(SitesWansDeleteResponseHealthCheckRate).pipe( T.Body("health_check_rate"), ), ), name: S.optional(S.NullOr(S.String)), physport: S.optional(S.NullOr(S.Number)), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesWansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSiteWanResponse", }) as any as S.Schema; export type EditSitesAppConfigurationRequestPreferredWansList = Array; export const EditSitesAppConfigurationRequestPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface EditSitesAppConfigurationRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ appConfigId: string; /** Magic account app ID. */ accountAppId?: string; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean; /** Managed app ID. */ managedAppId?: string; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: EditSitesAppConfigurationRequestPreferredWansList; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number; } export const EditSitesAppConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), appConfigId: S.String.pipe(T.Label("app_config_id")), accountAppId: S.optional(S.String.pipe(T.Body("account_app_id"))), breakout: S.optional(S.Boolean), managedAppId: S.optional(S.String.pipe(T.Body("managed_app_id"))), preferredWans: S.optional( EditSitesAppConfigurationRequestPreferredWansList.pipe( T.Body("preferred_wans"), ), ), priority: S.optional(S.Number), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "EditSitesAppConfigurationRequest", }) as any as S.Schema; export type EditSitesAppConfigurationResultAccountAppPreferredWansList = Array; export const EditSitesAppConfigurationResultAccountAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface EditSitesAppConfigurationResultAccountApp { /** Magic account app ID. */ accountAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: EditSitesAppConfigurationResultAccountAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const EditSitesAppConfigurationResultAccountApp = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( EditSitesAppConfigurationResultAccountAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "EditSitesAppConfigurationResultAccountApp", }) as any as S.Schema; export type EditSitesAppConfigurationResultManagedAppPreferredWansList = Array; export const EditSitesAppConfigurationResultManagedAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface EditSitesAppConfigurationResultManagedApp { /** Managed app ID. */ managedAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: EditSitesAppConfigurationResultManagedAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const EditSitesAppConfigurationResultManagedApp = /*@__PURE__*/ S.suspend(() => S.Struct({ managedAppId: S.String.pipe(T.Body("managed_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( EditSitesAppConfigurationResultManagedAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "EditSitesAppConfigurationResultManagedApp", }) as any as S.Schema; export type EditSitesAppConfigurationResult = | EditSitesAppConfigurationResultAccountApp | EditSitesAppConfigurationResultManagedApp; export const EditSitesAppConfigurationResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accountAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ["managedAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ]), ); export type EditSitesAppConfigurationResponse = EditSitesAppConfigurationResult; export const EditSitesAppConfigurationResponse = /*@__PURE__*/ S.suspend(() => EditSitesAppConfigurationResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "EditSitesAppConfigurationResponse", }) as any as S.Schema; export interface EmptyRouteRequest { /** Identifier */ accountId: string; } export const EmptyRouteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/magic/routes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "EmptyRouteRequest", }) as any as S.Schema; export type RoutesEmptyResponseDeletedRoutesItemScopeColoNamesList = Array; export const RoutesEmptyResponseDeletedRoutesItemScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesEmptyResponseDeletedRoutesItemScopeColoRegionsList = Array; export const RoutesEmptyResponseDeletedRoutesItemScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesEmptyResponseDeletedRoutesItemScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesEmptyResponseDeletedRoutesItemScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesEmptyResponseDeletedRoutesItemScopeColoRegionsList | null; } export const RoutesEmptyResponseDeletedRoutesItemScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( S.NullOr(RoutesEmptyResponseDeletedRoutesItemScopeColoNamesList).pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( S.NullOr(RoutesEmptyResponseDeletedRoutesItemScopeColoRegionsList).pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesEmptyResponseDeletedRoutesItemScope", }) as any as S.Schema; export interface RoutesEmptyResponseDeletedRoutesItem { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesEmptyResponseDeletedRoutesItemScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const RoutesEmptyResponseDeletedRoutesItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional(S.NullOr(RoutesEmptyResponseDeletedRoutesItemScope)), weight: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RoutesEmptyResponseDeletedRoutesItem", }) as any as S.Schema; export type RoutesEmptyResponseDeletedRoutesList = Array; export const RoutesEmptyResponseDeletedRoutesList = /*@__PURE__*/ S.Array( RoutesEmptyResponseDeletedRoutesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface EmptyRouteResponse { deleted?: boolean | null; deletedRoutes?: RoutesEmptyResponseDeletedRoutesList | null; } export const EmptyRouteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ deleted: S.optional(S.NullOr(S.Boolean)), deletedRoutes: S.optional( S.NullOr(RoutesEmptyResponseDeletedRoutesList).pipe( T.Body("deleted_routes"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "EmptyRouteResponse", }) as any as S.Schema; export interface GetCf1SiteRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; } export const GetCf1SiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCf1SiteRequest", }) as any as S.Schema; export type Cf1SitesGetResponseLocation = Cf1SitesCreateResultItemLocation; export const Cf1SitesGetResponseLocation = Cf1SitesCreateResultItemLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCf1SiteResponse { /** A human-provided name describing the CF1 Site that should be unique within the account. */ name: string; /** Identifier */ id?: string | null; createdOn?: string | null; /** A human-provided description of the CF1 Site. */ description?: string | null; location?: Cf1SitesCreateResultItemLocation | null; modifiedOn?: string | null; } export const GetCf1SiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), location: S.optional(S.NullOr(Cf1SitesCreateResultItemLocation)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCf1SiteResponse", }) as any as S.Schema; export interface GetCf1SiteRampRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; /** Identifier */ rampId: string; } export const GetCf1SiteRampRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), rampId: S.String.pipe(T.Label("ramp_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps/{ramp_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCf1SiteRampRequest", }) as any as S.Schema; export type Cf1SitesRampsGetResponseType = | "gre" | "gre_interconnect" | "mpls_interconnect" | "mconn" | "ipsec"; export const Cf1SitesRampsGetResponseType = /*@__PURE__*/ S.String; export type Cf1SitesRampsGetResponseGre = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsGetResponseGre = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsGetResponseGreInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsGetResponseGreInterconnect = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsGetResponseIpsec = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsGetResponseIpsec = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsGetResponseMconn = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsGetResponseMconn = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsGetResponseMplsInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsGetResponseMplsInterconnect = Cf1SitesRampsCreateResultItemGre; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCf1SiteRampResponse { /** Identifier */ id: string; createdOn: string; modifiedOn: string; /** A human-provided name describing the ramp that should be unique within the CF1 Site. */ name: string; /** The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. */ type: Cf1SitesRampsGetResponseType; /** A human-provided description of the ramp. */ description?: string | null; gre?: Cf1SitesRampsCreateResultItemGre | null; greInterconnect?: Cf1SitesRampsCreateResultItemGre | null; ipsec?: Cf1SitesRampsCreateResultItemGre | null; mconn?: Cf1SitesRampsCreateResultItemGre | null; mplsInterconnect?: Cf1SitesRampsCreateResultItemGre | null; } export const GetCf1SiteRampResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, type: Cf1SitesRampsGetResponseType, description: S.optional(S.NullOr(S.String)), gre: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), greInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("gre_interconnect"), ), ), ipsec: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mconn: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mplsInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("mpls_interconnect"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCf1SiteRampResponse", }) as any as S.Schema; export interface GetCfInterconnectRequest { /** Identifier */ accountId: string; /** Identifier */ cfInterconnectId: string; xMagicNewHcTarget?: boolean; } export const GetCfInterconnectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cfInterconnectId: S.String.pipe(T.Label("cf_interconnect_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCfInterconnectRequest", }) as any as S.Schema; export type CfInterconnectsGetResponseInterconnectGre = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre; export const CfInterconnectsGetResponseInterconnectGre = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre; export type CfInterconnectsGetResponseInterconnectHealthCheckRate = | "low" | "mid" | "high"; export const CfInterconnectsGetResponseInterconnectHealthCheckRate = /*@__PURE__*/ S.String; export type CfInterconnectsGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type CfInterconnectsGetResponseInterconnectHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsGetResponseInterconnectHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type CfInterconnectsGetResponseInterconnectHealthCheckType = | "reply" | "request"; export const CfInterconnectsGetResponseInterconnectHealthCheckType = /*@__PURE__*/ S.String; export interface CfInterconnectsGetResponseInterconnectHealthCheck { /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: CfInterconnectsGetResponseInterconnectHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: CfInterconnectsGetResponseInterconnectHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: CfInterconnectsGetResponseInterconnectHealthCheckType | null; } export const CfInterconnectsGetResponseInterconnectHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(CfInterconnectsGetResponseInterconnectHealthCheckRate), ), target: S.optional( S.NullOr(CfInterconnectsGetResponseInterconnectHealthCheckTarget), ), type: S.optional( S.NullOr(CfInterconnectsGetResponseInterconnectHealthCheckType), ), }), ).annotate({ identifier: "CfInterconnectsGetResponseInterconnectHealthCheck", }) as any as S.Schema; export interface CfInterconnectsGetResponseInterconnect { /** Identifier */ id?: string | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ coloName?: string | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the interconnect. */ description?: string | null; /** The configuration specific to GRE interconnects. */ gre?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre | null; healthCheck?: CfInterconnectsGetResponseInterconnectHealthCheck | null; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress?: string | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576. */ mtu?: number | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ name?: string | null; /** An identifier that correlates this interconnect with the corresponding V2 CNI interconnect resource. */ virtualPortReservationId?: string | null; } export const CfInterconnectsGetResponseInterconnect = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), gre: S.optional( S.NullOr(CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre), ), healthCheck: S.optional( S.NullOr(CfInterconnectsGetResponseInterconnectHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address")), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), virtualPortReservationId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_port_reservation_id")), ), }), ).annotate({ identifier: "CfInterconnectsGetResponseInterconnect", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCfInterconnectResponse { interconnect?: CfInterconnectsGetResponseInterconnect | null; } export const GetCfInterconnectResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ interconnect: S.optional(S.NullOr(CfInterconnectsGetResponseInterconnect)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCfInterconnectResponse", }) as any as S.Schema; export interface GetConnectorRequest { /** Account identifier */ accountId: string; connectorId: string; } export const GetConnectorRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConnectorRequest", }) as any as S.Schema; export type ConnectorsGetResponseInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsGetResponseInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsGetResponseInterruptWindowDaysOfWeekList = Array; export const ConnectorsGetResponseInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsGetResponseInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsGetResponseInterruptWindowEmbargoDatesList = Array; export const ConnectorsGetResponseInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConnectorsGetResponseDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsGetResponseDeviceType = /*@__PURE__*/ S.String; export interface ConnectorsGetResponseDevice { id: string; serialNumber?: string | null; type?: ConnectorsGetResponseDeviceType | null; } export const ConnectorsGetResponseDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), type: S.optional(S.NullOr(ConnectorsGetResponseDeviceType)), }), ).annotate({ identifier: "ConnectorsGetResponseDevice", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConnectorResponse { id: string; activated: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek: ConnectorsGetResponseInterruptWindowDaysOfWeekList; interruptWindowDurationHours: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates: ConnectorsGetResponseInterruptWindowEmbargoDatesList; interruptWindowHourOfDay: number; lastUpdated: string; notes: string; primary: boolean; timezone: string; device?: ConnectorsGetResponseDevice | null; lastHeartbeat?: string | null; lastSeenVersion?: string | null; licenseKey?: string | null; siteId?: string | null; } export const GetConnectorResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, activated: S.Boolean, interruptWindowDaysOfWeek: ConnectorsGetResponseInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), interruptWindowDurationHours: S.Number.pipe( T.Body("interrupt_window_duration_hours"), ), interruptWindowEmbargoDates: ConnectorsGetResponseInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), interruptWindowHourOfDay: S.Number.pipe( T.Body("interrupt_window_hour_of_day"), ), lastUpdated: S.String.pipe(T.Body("last_updated")), notes: S.String, primary: S.Boolean, timezone: S.String, device: S.optional(S.NullOr(ConnectorsGetResponseDevice)), lastHeartbeat: S.optional( S.NullOr(S.String).pipe(T.Body("last_heartbeat")), ), lastSeenVersion: S.optional( S.NullOr(S.String).pipe(T.Body("last_seen_version")), ), licenseKey: S.optional(S.NullOr(S.String).pipe(T.Body("license_key"))), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConnectorResponse", }) as any as S.Schema; export interface GetConnectorEventRequest { /** Account identifier */ accountId: string; connectorId: string; eventT: number; eventN: number; } export const GetConnectorEventRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), eventT: S.Number.pipe(T.Label("event_t")), eventN: S.Number.pipe(T.Label("event_n")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events/{event_t}.{event_n}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConnectorEventRequest", }) as any as S.Schema; export type ConnectorsEventsGetResponseEInitK = "Init"; export const ConnectorsEventsGetResponseEInitK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEInit { /** Initialized process */ k: ConnectorsEventsGetResponseEInitK; } export const ConnectorsEventsGetResponseEInit = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEInitK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEInit", }) as any as S.Schema; export type ConnectorsEventsGetResponseELeaveK = "Leave"; export const ConnectorsEventsGetResponseELeaveK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseELeave { /** Stopped process */ k: ConnectorsEventsGetResponseELeaveK; } export const ConnectorsEventsGetResponseELeave = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseELeaveK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseELeave", }) as any as S.Schema; export type ConnectorsEventsGetResponseEStartAttestationK = "StartAttestation"; export const ConnectorsEventsGetResponseEStartAttestationK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEStartAttestation { /** Started attestation */ k: ConnectorsEventsGetResponseEStartAttestationK; } export const ConnectorsEventsGetResponseEStartAttestation = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEStartAttestationK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEStartAttestation", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishAttestationSuccessK = "FinishAttestationSuccess"; export const ConnectorsEventsGetResponseEFinishAttestationSuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishAttestationSuccess { /** Finished attestation */ k: ConnectorsEventsGetResponseEFinishAttestationSuccessK; } export const ConnectorsEventsGetResponseEFinishAttestationSuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishAttestationSuccessK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishAttestationSuccess", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishAttestationFailureK = "FinishAttestationFailure"; export const ConnectorsEventsGetResponseEFinishAttestationFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishAttestationFailure { /** Failed attestation */ k: ConnectorsEventsGetResponseEFinishAttestationFailureK; } export const ConnectorsEventsGetResponseEFinishAttestationFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishAttestationFailureK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishAttestationFailure", }) as any as S.Schema; export type ConnectorsEventsGetResponseEStartRotateCryptKeyK = "StartRotateCryptKey"; export const ConnectorsEventsGetResponseEStartRotateCryptKeyK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEStartRotateCryptKey { /** Started crypt key rotation */ k: ConnectorsEventsGetResponseEStartRotateCryptKeyK; } export const ConnectorsEventsGetResponseEStartRotateCryptKey = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEStartRotateCryptKeyK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEStartRotateCryptKey", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishRotateCryptKeySuccessK = "FinishRotateCryptKeySuccess"; export const ConnectorsEventsGetResponseEFinishRotateCryptKeySuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishRotateCryptKeySuccess { /** Finished crypt key rotation */ k: ConnectorsEventsGetResponseEFinishRotateCryptKeySuccessK; } export const ConnectorsEventsGetResponseEFinishRotateCryptKeySuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishRotateCryptKeySuccessK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishRotateCryptKeySuccess", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishRotateCryptKeyFailureK = "FinishRotateCryptKeyFailure"; export const ConnectorsEventsGetResponseEFinishRotateCryptKeyFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishRotateCryptKeyFailure { /** Failed crypt key rotation */ k: ConnectorsEventsGetResponseEFinishRotateCryptKeyFailureK; } export const ConnectorsEventsGetResponseEFinishRotateCryptKeyFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishRotateCryptKeyFailureK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishRotateCryptKeyFailure", }) as any as S.Schema; export type ConnectorsEventsGetResponseEStartRotatePkiK = "StartRotatePki"; export const ConnectorsEventsGetResponseEStartRotatePkiK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEStartRotatePki { /** Started PKI rotation */ k: ConnectorsEventsGetResponseEStartRotatePkiK; } export const ConnectorsEventsGetResponseEStartRotatePki = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEStartRotatePkiK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEStartRotatePki", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishRotatePkiSuccessK = "FinishRotatePkiSuccess"; export const ConnectorsEventsGetResponseEFinishRotatePkiSuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishRotatePkiSuccess { /** Finished PKI rotation */ k: ConnectorsEventsGetResponseEFinishRotatePkiSuccessK; } export const ConnectorsEventsGetResponseEFinishRotatePkiSuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishRotatePkiSuccessK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishRotatePkiSuccess", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishRotatePkiFailureK = "FinishRotatePkiFailure"; export const ConnectorsEventsGetResponseEFinishRotatePkiFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishRotatePkiFailure { /** Failed PKI rotation */ k: ConnectorsEventsGetResponseEFinishRotatePkiFailureK; } export const ConnectorsEventsGetResponseEFinishRotatePkiFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishRotatePkiFailureK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishRotatePkiFailure", }) as any as S.Schema; export type ConnectorsEventsGetResponseEStartUpgradeK = "StartUpgrade"; export const ConnectorsEventsGetResponseEStartUpgradeK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEStartUpgrade { /** Started upgrade */ k: ConnectorsEventsGetResponseEStartUpgradeK; /** Location of upgrade bundle */ url: string; } export const ConnectorsEventsGetResponseEStartUpgrade = /*@__PURE__*/ S.suspend( () => S.Struct({ k: ConnectorsEventsGetResponseEStartUpgradeK, url: S.String, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEStartUpgrade", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishUpgradeSuccessK = "FinishUpgradeSuccess"; export const ConnectorsEventsGetResponseEFinishUpgradeSuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishUpgradeSuccess { /** Finished upgrade */ k: ConnectorsEventsGetResponseEFinishUpgradeSuccessK; } export const ConnectorsEventsGetResponseEFinishUpgradeSuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishUpgradeSuccessK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishUpgradeSuccess", }) as any as S.Schema; export type ConnectorsEventsGetResponseEFinishUpgradeFailureK = "FinishUpgradeFailure"; export const ConnectorsEventsGetResponseEFinishUpgradeFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEFinishUpgradeFailure { /** Failed upgrade */ k: ConnectorsEventsGetResponseEFinishUpgradeFailureK; } export const ConnectorsEventsGetResponseEFinishUpgradeFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEFinishUpgradeFailureK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEFinishUpgradeFailure", }) as any as S.Schema; export type ConnectorsEventsGetResponseEReconcileK = "Reconcile"; export const ConnectorsEventsGetResponseEReconcileK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEReconcile { /** Reconciled */ k: ConnectorsEventsGetResponseEReconcileK; } export const ConnectorsEventsGetResponseEReconcile = /*@__PURE__*/ S.suspend( () => S.Struct({ k: ConnectorsEventsGetResponseEReconcileK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEReconcile", }) as any as S.Schema; export type ConnectorsEventsGetResponseEConfigureCloudflaredTunnelK = "ConfigureCloudflaredTunnel"; export const ConnectorsEventsGetResponseEConfigureCloudflaredTunnelK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseEConfigureCloudflaredTunnel { /** Configured Cloudflared tunnel */ k: ConnectorsEventsGetResponseEConfigureCloudflaredTunnelK; } export const ConnectorsEventsGetResponseEConfigureCloudflaredTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseEConfigureCloudflaredTunnelK, }), ).annotate({ identifier: "ConnectorsEventsGetResponseEConfigureCloudflaredTunnel", }) as any as S.Schema; export type ConnectorsEventsGetResponseERekeyInstallBothK = "RekeyInstallBoth"; export const ConnectorsEventsGetResponseERekeyInstallBothK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseERekeyInstallBoth { /** Installed initial inbound and outbound keys */ k: ConnectorsEventsGetResponseERekeyInstallBothK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsGetResponseERekeyInstallBoth = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseERekeyInstallBothK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsGetResponseERekeyInstallBoth", }) as any as S.Schema; export type ConnectorsEventsGetResponseERekeyStartK = "RekeyStart"; export const ConnectorsEventsGetResponseERekeyStartK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseERekeyStart { /** Installed new inbound key, kept old outbound */ k: ConnectorsEventsGetResponseERekeyStartK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsGetResponseERekeyStart = /*@__PURE__*/ S.suspend( () => S.Struct({ k: ConnectorsEventsGetResponseERekeyStartK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsGetResponseERekeyStart", }) as any as S.Schema; export type ConnectorsEventsGetResponseERekeyAdvanceK = "RekeyAdvance"; export const ConnectorsEventsGetResponseERekeyAdvanceK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseERekeyAdvance { /** Confirmed traffic on new inbound key, swapped outbound to new */ k: ConnectorsEventsGetResponseERekeyAdvanceK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsGetResponseERekeyAdvance = /*@__PURE__*/ S.suspend( () => S.Struct({ k: ConnectorsEventsGetResponseERekeyAdvanceK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsGetResponseERekeyAdvance", }) as any as S.Schema; export type ConnectorsEventsGetResponseERekeyCompleteK = "RekeyComplete"; export const ConnectorsEventsGetResponseERekeyCompleteK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseERekeyComplete { /** Deleted old keys */ k: ConnectorsEventsGetResponseERekeyCompleteK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsGetResponseERekeyComplete = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsGetResponseERekeyCompleteK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsGetResponseERekeyComplete", }) as any as S.Schema; export type ConnectorsEventsGetResponseERekeyResetK = "RekeyReset"; export const ConnectorsEventsGetResponseERekeyResetK = /*@__PURE__*/ S.String; export interface ConnectorsEventsGetResponseERekeyReset { /** Deleted all keys after receiving an unexpected key */ k: ConnectorsEventsGetResponseERekeyResetK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsGetResponseERekeyReset = /*@__PURE__*/ S.suspend( () => S.Struct({ k: ConnectorsEventsGetResponseERekeyResetK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsGetResponseERekeyReset", }) as any as S.Schema; export type ConnectorsEventsGetResponseE = | ConnectorsEventsGetResponseEInit | ConnectorsEventsGetResponseELeave | ConnectorsEventsGetResponseEStartAttestation | ConnectorsEventsGetResponseEFinishAttestationSuccess | ConnectorsEventsGetResponseEFinishAttestationFailure | ConnectorsEventsGetResponseEStartRotateCryptKey | ConnectorsEventsGetResponseEFinishRotateCryptKeySuccess | ConnectorsEventsGetResponseEFinishRotateCryptKeyFailure | ConnectorsEventsGetResponseEStartRotatePki | ConnectorsEventsGetResponseEFinishRotatePkiSuccess | ConnectorsEventsGetResponseEFinishRotatePkiFailure | ConnectorsEventsGetResponseEStartUpgrade | ConnectorsEventsGetResponseEFinishUpgradeSuccess | ConnectorsEventsGetResponseEFinishUpgradeFailure | ConnectorsEventsGetResponseEReconcile | ConnectorsEventsGetResponseEConfigureCloudflaredTunnel | ConnectorsEventsGetResponseERekeyInstallBoth | ConnectorsEventsGetResponseERekeyStart | ConnectorsEventsGetResponseERekeyAdvance | ConnectorsEventsGetResponseERekeyComplete | ConnectorsEventsGetResponseERekeyReset; export const ConnectorsEventsGetResponseE = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k", "url"], ["k"], ["k"], ["k"], ["k"], ["k", "tunnelId"], ["k", "tunnelId"], ["k", "tunnelId"], ["k", "tunnelId"], ["k", "tunnelId"], ]), ); /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConnectorEventResponse { e: ConnectorsEventsGetResponseE; /** Sequence number, used to order events with the same timestamp */ n: number; /** Time the Event was recorded (seconds since the Unix epoch) */ t: number; /** Version */ v?: string | null; } export const GetConnectorEventResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ e: ConnectorsEventsGetResponseE, n: S.Number, t: S.Number, v: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConnectorEventResponse", }) as any as S.Schema; export interface GetConnectorSnapshotRequest { /** Account identifier */ accountId: string; connectorId: string; snapshotT: number; } export const GetConnectorSnapshotRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), snapshotT: S.Number.pipe(T.Label("snapshot_t")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots/{snapshot_t}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConnectorSnapshotRequest", }) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseBondsItem { /** Name of the network interface */ name: string; /** Current status of the network interface */ status: string; } export const ConnectorsSnapshotsGetResponseBondsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ name: S.String, status: S.String, }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseBondsItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseBondsList = Array; export const ConnectorsSnapshotsGetResponseBondsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseBondsItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseDhcpLeasesItem { /** Client ID of the device the IP Address was leased to */ clientId: string; /** Expiry time of the DHCP lease (seconds since the Unix epoch) */ expiryTime: number; /** Hostname of the device the IP Address was leased to */ hostname: string; /** Name of the network interface */ interfaceName: string; /** IP Address that was leased */ ipAddress: string; /** MAC Address of the device the IP Address was leased to */ macAddress: string; } export const ConnectorsSnapshotsGetResponseDhcpLeasesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ clientId: S.String.pipe(T.Body("client_id")), expiryTime: S.Number.pipe(T.Body("expiry_time")), hostname: S.String, interfaceName: S.String.pipe(T.Body("interface_name")), ipAddress: S.String.pipe(T.Body("ip_address")), macAddress: S.String.pipe(T.Body("mac_address")), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseDhcpLeasesItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseDhcpLeasesList = Array; export const ConnectorsSnapshotsGetResponseDhcpLeasesList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseDhcpLeasesItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseDisksItem { /** I/Os currently in progress */ inProgress: number; /** Device major number */ major: number; /** Reads merged */ merged: number; /** Device minor number */ minor: number; /** Device name */ name: string; /** Reads completed successfully */ reads: number; /** Sectors read successfully */ sectorsRead: number; /** Sectors written successfully */ sectorsWritten: number; /** Time spent doing I/Os (milliseconds) */ timeInProgressMs: number; /** Time spent reading (milliseconds) */ timeReadingMs: number; /** Time spent writing (milliseconds) */ timeWritingMs: number; /** Weighted time spent doing I/Os (milliseconds) */ weightedTimeInProgressMs: number; /** Writes completed */ writes: number; /** Writes merged */ writesMerged: number; /** Discards completed successfully */ discards?: number | null; /** Discards merged */ discardsMerged?: number | null; /** Flushes completed successfully */ flushes?: number | null; /** Sectors discarded */ sectorsDiscarded?: number | null; /** Time spent discarding (milliseconds) */ timeDiscardingMs?: number | null; /** Time spent flushing (milliseconds) */ timeFlushingMs?: number | null; } export const ConnectorsSnapshotsGetResponseDisksItem = /*@__PURE__*/ S.suspend( () => S.Struct({ inProgress: S.Number.pipe(T.Body("in_progress")), major: S.Number, merged: S.Number, minor: S.Number, name: S.String, reads: S.Number, sectorsRead: S.Number.pipe(T.Body("sectors_read")), sectorsWritten: S.Number.pipe(T.Body("sectors_written")), timeInProgressMs: S.Number.pipe(T.Body("time_in_progress_ms")), timeReadingMs: S.Number.pipe(T.Body("time_reading_ms")), timeWritingMs: S.Number.pipe(T.Body("time_writing_ms")), weightedTimeInProgressMs: S.Number.pipe( T.Body("weighted_time_in_progress_ms"), ), writes: S.Number, writesMerged: S.Number.pipe(T.Body("writes_merged")), discards: S.optional(S.NullOr(S.Number)), discardsMerged: S.optional( S.NullOr(S.Number).pipe(T.Body("discards_merged")), ), flushes: S.optional(S.NullOr(S.Number)), sectorsDiscarded: S.optional( S.NullOr(S.Number).pipe(T.Body("sectors_discarded")), ), timeDiscardingMs: S.optional( S.NullOr(S.Number).pipe(T.Body("time_discarding_ms")), ), timeFlushingMs: S.optional( S.NullOr(S.Number).pipe(T.Body("time_flushing_ms")), ), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseDisksItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseDisksList = Array; export const ConnectorsSnapshotsGetResponseDisksList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseDisksItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem { /** Name of the network interface */ interfaceName: string; /** IP address of the network interface */ ipAddress: string; } export const ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ interfaceName: S.String.pipe(T.Body("interface_name")), ipAddress: S.String.pipe(T.Body("ip_address")), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesList = Array; export const ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseInterfacesItem { /** Name of the network interface */ name: string; /** UP/DOWN state of the network interface */ operstate: string; ipAddresses?: ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesList | null; /** Speed of the network interface (bits per second) */ speed?: number | null; } export const ConnectorsSnapshotsGetResponseInterfacesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, operstate: S.String, ipAddresses: S.optional( S.NullOr( ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesList, ).pipe(T.Body("ip_addresses")), ), speed: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseInterfacesItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseInterfacesList = Array; export const ConnectorsSnapshotsGetResponseInterfacesList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseInterfacesItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseMountsItem { /** File system on disk (EXT4, NTFS, etc.) */ fileSystem: string; /** Kind of disk (HDD, SSD, etc.) */ kind: string; /** Path where disk is mounted */ mountPoint: string; /** Name of the disk mount */ name: string; /** Available disk size (bytes) */ availableBytes?: number | null; /** Available inodes on filesystem */ availableInodes?: number | null; /** Determines whether the disk is read-only */ isReadOnly?: boolean | null; /** Determines whether the disk is removable */ isRemovable?: boolean | null; /** Total disk size (bytes) */ totalBytes?: number | null; /** Total inodes on filesystem */ totalInodes?: number | null; } export const ConnectorsSnapshotsGetResponseMountsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ fileSystem: S.String.pipe(T.Body("file_system")), kind: S.String, mountPoint: S.String.pipe(T.Body("mount_point")), name: S.String, availableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("available_bytes")), ), availableInodes: S.optional( S.NullOr(S.Number).pipe(T.Body("available_inodes")), ), isReadOnly: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_read_only"))), isRemovable: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_removable"))), totalBytes: S.optional(S.NullOr(S.Number).pipe(T.Body("total_bytes"))), totalInodes: S.optional(S.NullOr(S.Number).pipe(T.Body("total_inodes"))), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseMountsItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseMountsList = Array; export const ConnectorsSnapshotsGetResponseMountsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseMountsItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseNetdevsItem { /** Name of the network device */ name: string; /** Total bytes received */ recvBytes: number; /** Compressed packets received */ recvCompressed: number; /** Packets dropped */ recvDrop: number; /** Bad packets received */ recvErrs: number; /** FIFO overruns */ recvFifo: number; /** Frame alignment errors */ recvFrame: number; /** Multicast packets received */ recvMulticast: number; /** Total packets received */ recvPackets: number; /** Total bytes transmitted */ sentBytes: number; /** Number of packets not sent due to carrier errors */ sentCarrier: number; /** Number of collisions */ sentColls: number; /** Number of compressed packets transmitted */ sentCompressed: number; /** Number of packets dropped during transmission */ sentDrop: number; /** Number of transmission errors */ sentErrs: number; /** FIFO overruns */ sentFifo: number; /** Total packets transmitted */ sentPackets: number; } export const ConnectorsSnapshotsGetResponseNetdevsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, recvBytes: S.Number.pipe(T.Body("recv_bytes")), recvCompressed: S.Number.pipe(T.Body("recv_compressed")), recvDrop: S.Number.pipe(T.Body("recv_drop")), recvErrs: S.Number.pipe(T.Body("recv_errs")), recvFifo: S.Number.pipe(T.Body("recv_fifo")), recvFrame: S.Number.pipe(T.Body("recv_frame")), recvMulticast: S.Number.pipe(T.Body("recv_multicast")), recvPackets: S.Number.pipe(T.Body("recv_packets")), sentBytes: S.Number.pipe(T.Body("sent_bytes")), sentCarrier: S.Number.pipe(T.Body("sent_carrier")), sentColls: S.Number.pipe(T.Body("sent_colls")), sentCompressed: S.Number.pipe(T.Body("sent_compressed")), sentDrop: S.Number.pipe(T.Body("sent_drop")), sentErrs: S.Number.pipe(T.Body("sent_errs")), sentFifo: S.Number.pipe(T.Body("sent_fifo")), sentPackets: S.Number.pipe(T.Body("sent_packets")), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseNetdevsItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseNetdevsList = Array; export const ConnectorsSnapshotsGetResponseNetdevsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseNetdevsItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseThermalsItem { /** Sensor identifier for the component */ label: string; /** Critical failure temperature of the component (degrees Celsius) */ criticalCelcius?: number | null; /** Current temperature of the component (degrees Celsius) */ currentCelcius?: number | null; /** Maximum temperature of the component (degrees Celsius) */ maxCelcius?: number | null; } export const ConnectorsSnapshotsGetResponseThermalsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ label: S.String, criticalCelcius: S.optional( S.NullOr(S.Number).pipe(T.Body("critical_celcius")), ), currentCelcius: S.optional( S.NullOr(S.Number).pipe(T.Body("current_celcius")), ), maxCelcius: S.optional(S.NullOr(S.Number).pipe(T.Body("max_celcius"))), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseThermalsItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseThermalsList = Array; export const ConnectorsSnapshotsGetResponseThermalsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseThermalsItem, ) as any as S.Schema; export interface ConnectorsSnapshotsGetResponseTunnelsItem { /** Name of tunnel health state (unknown, healthy, degraded, down) */ healthState: string; /** Numeric value associated with tunnel state (0 = unknown, 1 = healthy, 2 = degraded, 3 = down) */ healthValue: number; /** The tunnel interface name (i.e. xfrm1, xfrm3.99, etc.) */ interfaceName: string; /** Tunnel identifier */ tunnelId: string; /** Public socket address returned by the NAT detector */ natdResult?: string | null; /** Numeric NAT detector state (0 = detected, 1 = missing result, 2 = stale result) */ natdState?: number | null; /** Target socket address probed by the NAT detector, using the detector source port */ natdTarget?: string | null; /** MTU as measured between the two ends of the tunnel */ probedMtu?: number | null; /** Number of recent healthy pings for this tunnel */ recentHealthyPings?: number | null; /** Number of recent unhealthy pings for this tunnel */ recentUnhealthyPings?: number | null; } export const ConnectorsSnapshotsGetResponseTunnelsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ healthState: S.String.pipe(T.Body("health_state")), healthValue: S.Number.pipe(T.Body("health_value")), interfaceName: S.String.pipe(T.Body("interface_name")), tunnelId: S.String.pipe(T.Body("tunnel_id")), natdResult: S.optional(S.NullOr(S.String).pipe(T.Body("natd_result"))), natdState: S.optional(S.NullOr(S.Number).pipe(T.Body("natd_state"))), natdTarget: S.optional(S.NullOr(S.String).pipe(T.Body("natd_target"))), probedMtu: S.optional(S.NullOr(S.Number).pipe(T.Body("probed_mtu"))), recentHealthyPings: S.optional( S.NullOr(S.Number).pipe(T.Body("recent_healthy_pings")), ), recentUnhealthyPings: S.optional( S.NullOr(S.Number).pipe(T.Body("recent_unhealthy_pings")), ), }), ).annotate({ identifier: "ConnectorsSnapshotsGetResponseTunnelsItem", }) as any as S.Schema; export type ConnectorsSnapshotsGetResponseTunnelsList = Array; export const ConnectorsSnapshotsGetResponseTunnelsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseTunnelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConnectorSnapshotResponse { /** Count of failures to reclaim space */ countReclaimFailures: number; /** Count of reclaimed paths */ countReclaimedPaths: number; /** Count of failed snapshot recordings */ countRecordFailed: number; /** Count of failed snapshot transmissions */ countTransmitFailures: number; /** Time the Snapshot was recorded (seconds since the Unix epoch) */ t: number; /** Version */ v: string; bonds?: ConnectorsSnapshotsGetResponseBondsList | null; /** Count of processors/cores */ cpuCount?: number | null; /** Percentage of time over a 10 second window that tasks were stalled */ cpu_pressure_10s?: number | null; /** Percentage of time over a 5 minute window that tasks were stalled */ cpu_pressure_300s?: number | null; /** Percentage of time over a 1 minute window that tasks were stalled */ cpu_pressure_60s?: number | null; /** Total stall time (microseconds) */ cpuPressureTotalUs?: number | null; /** Time spent running a virtual CPU or guest OS (milliseconds) */ cpuTimeGuestMs?: number | null; /** Time spent running a niced guest (milliseconds) */ cpuTimeGuestNiceMs?: number | null; /** Time spent in idle state (milliseconds) */ cpuTimeIdleMs?: number | null; /** Time spent wait for I/O to complete (milliseconds) */ cpuTimeIowaitMs?: number | null; /** Time spent servicing interrupts (milliseconds) */ cpuTimeIrqMs?: number | null; /** Time spent in low-priority user mode (milliseconds) */ cpuTimeNiceMs?: number | null; /** Time spent servicing softirqs (milliseconds) */ cpuTimeSoftirqMs?: number | null; /** Time stolen (milliseconds) */ cpuTimeStealMs?: number | null; /** Time spent in system mode (milliseconds) */ cpuTimeSystemMs?: number | null; /** Time spent in user mode (milliseconds) */ cpuTimeUserMs?: number | null; /** Number of network operations applied during state transition */ delta?: number | null; dhcpLeases?: ConnectorsSnapshotsGetResponseDhcpLeasesList | null; disks?: ConnectorsSnapshotsGetResponseDisksList | null; /** Simulated number of network operations applied during state transition */ epsilon?: number | null; /** Name of high availability state */ haState?: string | null; /** Numeric value associated with high availability state (0 = disabled, 1 = active, 2 = standby, 3 = stopped, 4 = fault) */ haValue?: number | null; interfaces?: ConnectorsSnapshotsGetResponseInterfacesList | null; /** Percentage of time over a 10 second window that all tasks were stalled */ io_pressure_full_10s?: number | null; /** Percentage of time over a 5 minute window that all tasks were stalled */ io_pressure_full_300s?: number | null; /** Percentage of time over a 1 minute window that all tasks were stalled */ io_pressure_full_60s?: number | null; /** Total stall time (microseconds) */ ioPressureFullTotalUs?: number | null; /** Percentage of time over a 10 second window that some tasks were stalled */ io_pressure_some_10s?: number | null; /** Percentage of time over a 3 minute window that some tasks were stalled */ io_pressure_some_300s?: number | null; /** Percentage of time over a 1 minute window that some tasks were stalled */ io_pressure_some_60s?: number | null; /** Total stall time (microseconds) */ ioPressureSomeTotalUs?: number | null; /** Boot time (seconds since Unix epoch) */ kernelBtime?: number | null; /** Number of context switches that the system underwent */ kernelCtxt?: number | null; /** Number of forks since boot */ kernelProcesses?: number | null; /** Number of processes blocked waiting for I/O */ kernelProcessesBlocked?: number | null; /** Number of processes in runnable state */ kernelProcessesRunning?: number | null; /** The fifteen-minute load average */ load_average_15m?: number | null; /** The one-minute load average */ load_average_1m?: number | null; /** The five-minute load average */ load_average_5m?: number | null; /** Number of currently runnable kernel scheduling entities */ loadAverageCur?: number | null; /** Number of kernel scheduling entities that currently exist on the system */ loadAverageMax?: number | null; /** Memory that has been used more recently */ memoryActiveBytes?: number | null; /** Non-file backed huge pages mapped into user-space page tables */ memoryAnonHugepagesBytes?: number | null; /** Non-file backed pages mapped into user-space page tables */ memoryAnonPagesBytes?: number | null; /** Estimate of how much memory is available for starting new applications */ memoryAvailableBytes?: number | null; /** Memory used for block device bounce buffers */ memoryBounceBytes?: number | null; /** Relatively temporary storage for raw disk blocks */ memoryBuffersBytes?: number | null; /** In-memory cache for files read from the disk */ memoryCachedBytes?: number | null; /** Free CMA (Contiguous Memory Allocator) pages */ memoryCmaFreeBytes?: number | null; /** Total CMA (Contiguous Memory Allocator) pages */ memoryCmaTotalBytes?: number | null; /** Total amount of memory currently available to be allocated on the system */ memoryCommitLimitBytes?: number | null; /** Amount of memory presently allocated on the system */ memoryCommittedAsBytes?: number | null; /** Memory which is waiting to get written back to the disk */ memoryDirtyBytes?: number | null; /** The sum of LowFree and HighFree */ memoryFreeBytes?: number | null; /** Amount of free highmem */ memoryHighFreeBytes?: number | null; /** Total amount of highmem */ memoryHighTotalBytes?: number | null; /** The number of huge pages in the pool that are not yet allocated */ memoryHugepagesFree?: number | null; /** Number of huge pages for which a commitment has been made, but no allocation has yet been made */ memoryHugepagesRsvd?: number | null; /** Number of huge pages in the pool above the threshold */ memoryHugepagesSurp?: number | null; /** The size of the pool of huge pages */ memoryHugepagesTotal?: number | null; /** The size of huge pages */ memoryHugepagesizeBytes?: number | null; /** Memory which has been less recently used */ memoryInactiveBytes?: number | null; /** Kernel allocations that the kernel will attempt to reclaim under memory pressure */ memoryKReclaimableBytes?: number | null; /** Amount of memory allocated to kernel stacks */ memoryKernelStackBytes?: number | null; /** Amount of free lowmem */ memoryLowFreeBytes?: number | null; /** Total amount of lowmem */ memoryLowTotalBytes?: number | null; /** Files which have been mapped into memory */ memoryMappedBytes?: number | null; /** Amount of memory dedicated to the lowest level of page tables */ memoryPageTablesBytes?: number | null; /** Memory allocated to the per-cpu alloctor used to back per-cpu allocations */ memoryPerCpuBytes?: number | null; /** Percentage of time over a 10 second window that all tasks were stalled */ memory_pressure_full_10s?: number | null; /** Percentage of time over a 5 minute window that all tasks were stalled */ memory_pressure_full_300s?: number | null; /** Percentage of time over a 1 minute window that all tasks were stalled */ memory_pressure_full_60s?: number | null; /** Total stall time (microseconds) */ memoryPressureFullTotalUs?: number | null; /** Percentage of time over a 10 second window that some tasks were stalled */ memory_pressure_some_10s?: number | null; /** Percentage of time over a 5 minute window that some tasks were stalled */ memory_pressure_some_300s?: number | null; /** Percentage of time over a 1 minute window that some tasks were stalled */ memory_pressure_some_60s?: number | null; /** Total stall time (microseconds) */ memoryPressureSomeTotalUs?: number | null; /** Part of slab that can be reclaimed on memory pressure */ memorySReclaimableBytes?: number | null; /** Part of slab that cannot be reclaimed on memory pressure */ memorySUnreclaimBytes?: number | null; /** Amount of memory dedicated to the lowest level of page tables */ memorySecondaryPageTablesBytes?: number | null; /** Amount of memory consumed by tmpfs */ memoryShmemBytes?: number | null; /** Memory used by shmem and tmpfs, allocated with huge pages */ memoryShmemHugepagesBytes?: number | null; /** Shared memory mapped into user space with huge pages */ memoryShmemPmdMappedBytes?: number | null; /** In-kernel data structures cache */ memorySlabBytes?: number | null; /** Memory swapped out and back in while still in swap file */ memorySwapCachedBytes?: number | null; /** Amount of swap space that is currently unused */ memorySwapFreeBytes?: number | null; /** Total amount of swap space available */ memorySwapTotalBytes?: number | null; /** Total usable RAM */ memoryTotalBytes?: number | null; /** Largest contiguous block of vmalloc area which is free */ memoryVmallocChunkBytes?: number | null; /** Total size of vmalloc memory area */ memoryVmallocTotalBytes?: number | null; /** Amount of vmalloc area which is used */ memoryVmallocUsedBytes?: number | null; /** Memory which is actively being written back to the disk */ memoryWritebackBytes?: number | null; /** Memory used by FUSE for temporary writeback buffers */ memoryWritebackTmpBytes?: number | null; /** Memory consumed by the zswap backend, compressed */ memoryZSwapBytes?: number | null; /** Amount of anonymous memory stored in zswap, uncompressed */ memoryZSwappedBytes?: number | null; mounts?: ConnectorsSnapshotsGetResponseMountsList | null; netdevs?: ConnectorsSnapshotsGetResponseNetdevsList | null; /** Platform identifier */ platform?: string | null; /** Number of ICMP Address Mask Reply messages received */ snmpIcmpInAddrMaskReps?: number | null; /** Number of ICMP Address Mask Request messages received */ snmpIcmpInAddrMasks?: number | null; /** Number of ICMP messages received with bad checksums */ snmpIcmpInCsumErrors?: number | null; /** Number of ICMP Destination Unreachable messages received */ snmpIcmpInDestUnreachs?: number | null; /** Number of ICMP Echo Reply messages received */ snmpIcmpInEchoReps?: number | null; /** Number of ICMP Echo (request) messages received */ snmpIcmpInEchos?: number | null; /** Number of ICMP messages received with ICMP-specific errors */ snmpIcmpInErrors?: number | null; /** Number of ICMP messages received */ snmpIcmpInMsgs?: number | null; /** Number of ICMP Parameter Problem messages received */ snmpIcmpInParmProbs?: number | null; /** Number of ICMP Redirect messages received */ snmpIcmpInRedirects?: number | null; /** Number of ICMP Source Quench messages received */ snmpIcmpInSrcQuenchs?: number | null; /** Number of ICMP Time Exceeded messages received */ snmpIcmpInTimeExcds?: number | null; /** Number of ICMP Address Mask Request messages received */ snmpIcmpInTimestampReps?: number | null; /** Number of ICMP Timestamp (request) messages received */ snmpIcmpInTimestamps?: number | null; /** Number of ICMP Address Mask Reply messages sent */ snmpIcmpOutAddrMaskReps?: number | null; /** Number of ICMP Address Mask Request messages sent */ snmpIcmpOutAddrMasks?: number | null; /** Number of ICMP Destination Unreachable messages sent */ snmpIcmpOutDestUnreachs?: number | null; /** Number of ICMP Echo Reply messages sent */ snmpIcmpOutEchoReps?: number | null; /** Number of ICMP Echo (request) messages sent */ snmpIcmpOutEchos?: number | null; /** Number of ICMP messages which this entity did not send due to ICMP-specific errors */ snmpIcmpOutErrors?: number | null; /** Number of ICMP messages attempted to send */ snmpIcmpOutMsgs?: number | null; /** Number of ICMP Parameter Problem messages sent */ snmpIcmpOutParmProbs?: number | null; /** Number of ICMP Redirect messages sent */ snmpIcmpOutRedirects?: number | null; /** Number of ICMP Source Quench messages sent */ snmpIcmpOutSrcQuenchs?: number | null; /** Number of ICMP Time Exceeded messages sent */ snmpIcmpOutTimeExcds?: number | null; /** Number of ICMP Timestamp Reply messages sent */ snmpIcmpOutTimestampReps?: number | null; /** Number of ICMP Timestamp (request) messages sent */ snmpIcmpOutTimestamps?: number | null; /** Default value of the Time-To-Live field of the IP header */ snmpIpDefaultTtl?: number | null; /** Number of datagrams forwarded to their final destination */ snmpIpForwDatagrams?: number | null; /** Set when acting as an IP gateway */ snmpIpForwardingEnabled?: boolean | null; /** Number of datagrams generated by fragmentation */ snmpIpFragCreates?: number | null; /** Number of datagrams discarded because fragmentation failed */ snmpIpFragFails?: number | null; /** Number of datagrams successfully fragmented */ snmpIpFragOks?: number | null; /** Number of input datagrams discarded due to errors in the IP address */ snmpIpInAddrErrors?: number | null; /** Number of input datagrams successfully delivered to IP user-protocols */ snmpIpInDelivers?: number | null; /** Number of input datagrams otherwise discarded */ snmpIpInDiscards?: number | null; /** Number of input datagrams discarded due to errors in the IP header */ snmpIpInHdrErrors?: number | null; /** Number of input datagrams received from interfaces */ snmpIpInReceives?: number | null; /** Number of input datagrams discarded due unknown or unsupported protocol */ snmpIpInUnknownProtos?: number | null; /** Number of output datagrams otherwise discarded */ snmpIpOutDiscards?: number | null; /** Number of output datagrams discarded because no route matched */ snmpIpOutNoRoutes?: number | null; /** Number of datagrams supplied for transmission */ snmpIpOutRequests?: number | null; /** Number of failures detected by the reassembly algorithm */ snmpIpReasmFails?: number | null; /** Number of datagrams successfully reassembled */ snmpIpReasmOks?: number | null; /** Number of fragments received which needed to be reassembled */ snmpIpReasmReqds?: number | null; /** Number of seconds fragments are held while awaiting reassembly */ snmpIpReasmTimeout?: number | null; /** Number of times TCP transitions to SYN-SENT from CLOSED */ snmpTcpActiveOpens?: number | null; /** Number of times TCP transitions to CLOSED from SYN-SENT or SYN-RCVD, plus transitions to LISTEN from SYN-RCVD */ snmpTcpAttemptFails?: number | null; /** Number of TCP connections in ESTABLISHED or CLOSE-WAIT */ snmpTcpCurrEstab?: number | null; /** Number of times TCP transitions to CLOSED from ESTABLISHED or CLOSE-WAIT */ snmpTcpEstabResets?: number | null; /** Number of TCP segments received with checksum errors */ snmpTcpInCsumErrors?: number | null; /** Number of TCP segments received in error */ snmpTcpInErrs?: number | null; /** Number of TCP segments received */ snmpTcpInSegs?: number | null; /** Limit on the total number of TCP connections */ snmpTcpMaxConn?: number | null; /** Number of TCP segments sent with RST flag */ snmpTcpOutRsts?: number | null; /** Number of TCP segments sent */ snmpTcpOutSegs?: number | null; /** Number of times TCP transitions to SYN-RCVD from LISTEN */ snmpTcpPassiveOpens?: number | null; /** Number of TCP segments retransmitted */ snmpTcpRetransSegs?: number | null; /** Maximum value permitted by a TCP implementation for the retransmission timeout (milliseconds) */ snmpTcpRtoMax?: number | null; /** Minimum value permitted by a TCP implementation for the retransmission timeout (milliseconds) */ snmpTcpRtoMin?: number | null; /** Number of UDP datagrams delivered to UDP applications */ snmpUdpInDatagrams?: number | null; /** Number of UDP datagrams failed to be delivered for reasons other than lack of application at the destination port */ snmpUdpInErrors?: number | null; /** Number of UDP datagrams received for which there was not application at the destination port */ snmpUdpNoPorts?: number | null; /** Number of UDP datagrams sent */ snmpUdpOutDatagrams?: number | null; /** Boottime of the system (seconds since the Unix epoch) */ systemBootTimeS?: number | null; thermals?: ConnectorsSnapshotsGetResponseThermalsList | null; tunnels?: ConnectorsSnapshotsGetResponseTunnelsList | null; /** Sum of how much time each core has spent idle */ uptimeIdleMs?: number | null; /** Uptime of the system, including time spent in suspend */ uptimeTotalMs?: number | null; } export const GetConnectorSnapshotResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ countReclaimFailures: S.Number.pipe(T.Body("count_reclaim_failures")), countReclaimedPaths: S.Number.pipe(T.Body("count_reclaimed_paths")), countRecordFailed: S.Number.pipe(T.Body("count_record_failed")), countTransmitFailures: S.Number.pipe(T.Body("count_transmit_failures")), t: S.Number, v: S.String, bonds: S.optional(S.NullOr(ConnectorsSnapshotsGetResponseBondsList)), cpuCount: S.optional(S.NullOr(S.Number).pipe(T.Body("cpu_count"))), cpu_pressure_10s: S.optional(S.NullOr(S.Number)), cpu_pressure_300s: S.optional(S.NullOr(S.Number)), cpu_pressure_60s: S.optional(S.NullOr(S.Number)), cpuPressureTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_pressure_total_us")), ), cpuTimeGuestMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_guest_ms")), ), cpuTimeGuestNiceMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_guest_nice_ms")), ), cpuTimeIdleMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_idle_ms")), ), cpuTimeIowaitMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_iowait_ms")), ), cpuTimeIrqMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_irq_ms")), ), cpuTimeNiceMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_nice_ms")), ), cpuTimeSoftirqMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_softirq_ms")), ), cpuTimeStealMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_steal_ms")), ), cpuTimeSystemMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_system_ms")), ), cpuTimeUserMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_user_ms")), ), delta: S.optional(S.NullOr(S.Number)), dhcpLeases: S.optional( S.NullOr(ConnectorsSnapshotsGetResponseDhcpLeasesList).pipe( T.Body("dhcp_leases"), ), ), disks: S.optional(S.NullOr(ConnectorsSnapshotsGetResponseDisksList)), epsilon: S.optional(S.NullOr(S.Number)), haState: S.optional(S.NullOr(S.String).pipe(T.Body("ha_state"))), haValue: S.optional(S.NullOr(S.Number).pipe(T.Body("ha_value"))), interfaces: S.optional( S.NullOr(ConnectorsSnapshotsGetResponseInterfacesList), ), io_pressure_full_10s: S.optional(S.NullOr(S.Number)), io_pressure_full_300s: S.optional(S.NullOr(S.Number)), io_pressure_full_60s: S.optional(S.NullOr(S.Number)), ioPressureFullTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("io_pressure_full_total_us")), ), io_pressure_some_10s: S.optional(S.NullOr(S.Number)), io_pressure_some_300s: S.optional(S.NullOr(S.Number)), io_pressure_some_60s: S.optional(S.NullOr(S.Number)), ioPressureSomeTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("io_pressure_some_total_us")), ), kernelBtime: S.optional(S.NullOr(S.Number).pipe(T.Body("kernel_btime"))), kernelCtxt: S.optional(S.NullOr(S.Number).pipe(T.Body("kernel_ctxt"))), kernelProcesses: S.optional( S.NullOr(S.Number).pipe(T.Body("kernel_processes")), ), kernelProcessesBlocked: S.optional( S.NullOr(S.Number).pipe(T.Body("kernel_processes_blocked")), ), kernelProcessesRunning: S.optional( S.NullOr(S.Number).pipe(T.Body("kernel_processes_running")), ), load_average_15m: S.optional(S.NullOr(S.Number)), load_average_1m: S.optional(S.NullOr(S.Number)), load_average_5m: S.optional(S.NullOr(S.Number)), loadAverageCur: S.optional( S.NullOr(S.Number).pipe(T.Body("load_average_cur")), ), loadAverageMax: S.optional( S.NullOr(S.Number).pipe(T.Body("load_average_max")), ), memoryActiveBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_active_bytes")), ), memoryAnonHugepagesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_anon_hugepages_bytes")), ), memoryAnonPagesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_anon_pages_bytes")), ), memoryAvailableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_available_bytes")), ), memoryBounceBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_bounce_bytes")), ), memoryBuffersBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_buffers_bytes")), ), memoryCachedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_cached_bytes")), ), memoryCmaFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_cma_free_bytes")), ), memoryCmaTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_cma_total_bytes")), ), memoryCommitLimitBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_commit_limit_bytes")), ), memoryCommittedAsBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_committed_as_bytes")), ), memoryDirtyBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_dirty_bytes")), ), memoryFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_free_bytes")), ), memoryHighFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_high_free_bytes")), ), memoryHighTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_high_total_bytes")), ), memoryHugepagesFree: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_free")), ), memoryHugepagesRsvd: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_rsvd")), ), memoryHugepagesSurp: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_surp")), ), memoryHugepagesTotal: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_total")), ), memoryHugepagesizeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepagesize_bytes")), ), memoryInactiveBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_inactive_bytes")), ), memoryKReclaimableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_k_reclaimable_bytes")), ), memoryKernelStackBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_kernel_stack_bytes")), ), memoryLowFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_low_free_bytes")), ), memoryLowTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_low_total_bytes")), ), memoryMappedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_mapped_bytes")), ), memoryPageTablesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_page_tables_bytes")), ), memoryPerCpuBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_per_cpu_bytes")), ), memory_pressure_full_10s: S.optional(S.NullOr(S.Number)), memory_pressure_full_300s: S.optional(S.NullOr(S.Number)), memory_pressure_full_60s: S.optional(S.NullOr(S.Number)), memoryPressureFullTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_pressure_full_total_us")), ), memory_pressure_some_10s: S.optional(S.NullOr(S.Number)), memory_pressure_some_300s: S.optional(S.NullOr(S.Number)), memory_pressure_some_60s: S.optional(S.NullOr(S.Number)), memoryPressureSomeTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_pressure_some_total_us")), ), memorySReclaimableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_s_reclaimable_bytes")), ), memorySUnreclaimBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_s_unreclaim_bytes")), ), memorySecondaryPageTablesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_secondary_page_tables_bytes")), ), memoryShmemBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_shmem_bytes")), ), memoryShmemHugepagesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_shmem_hugepages_bytes")), ), memoryShmemPmdMappedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_shmem_pmd_mapped_bytes")), ), memorySlabBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_slab_bytes")), ), memorySwapCachedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_swap_cached_bytes")), ), memorySwapFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_swap_free_bytes")), ), memorySwapTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_swap_total_bytes")), ), memoryTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_total_bytes")), ), memoryVmallocChunkBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_vmalloc_chunk_bytes")), ), memoryVmallocTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_vmalloc_total_bytes")), ), memoryVmallocUsedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_vmalloc_used_bytes")), ), memoryWritebackBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_writeback_bytes")), ), memoryWritebackTmpBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_writeback_tmp_bytes")), ), memoryZSwapBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_z_swap_bytes")), ), memoryZSwappedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_z_swapped_bytes")), ), mounts: S.optional(S.NullOr(ConnectorsSnapshotsGetResponseMountsList)), netdevs: S.optional(S.NullOr(ConnectorsSnapshotsGetResponseNetdevsList)), platform: S.optional(S.NullOr(S.String)), snmpIcmpInAddrMaskReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_addr_mask_reps")), ), snmpIcmpInAddrMasks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_addr_masks")), ), snmpIcmpInCsumErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_csum_errors")), ), snmpIcmpInDestUnreachs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_dest_unreachs")), ), snmpIcmpInEchoReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_echo_reps")), ), snmpIcmpInEchos: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_echos")), ), snmpIcmpInErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_errors")), ), snmpIcmpInMsgs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_msgs")), ), snmpIcmpInParmProbs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_parm_probs")), ), snmpIcmpInRedirects: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_redirects")), ), snmpIcmpInSrcQuenchs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_src_quenchs")), ), snmpIcmpInTimeExcds: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_time_excds")), ), snmpIcmpInTimestampReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_timestamp_reps")), ), snmpIcmpInTimestamps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_timestamps")), ), snmpIcmpOutAddrMaskReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_addr_mask_reps")), ), snmpIcmpOutAddrMasks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_addr_masks")), ), snmpIcmpOutDestUnreachs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_dest_unreachs")), ), snmpIcmpOutEchoReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_echo_reps")), ), snmpIcmpOutEchos: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_echos")), ), snmpIcmpOutErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_errors")), ), snmpIcmpOutMsgs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_msgs")), ), snmpIcmpOutParmProbs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_parm_probs")), ), snmpIcmpOutRedirects: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_redirects")), ), snmpIcmpOutSrcQuenchs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_src_quenchs")), ), snmpIcmpOutTimeExcds: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_time_excds")), ), snmpIcmpOutTimestampReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_timestamp_reps")), ), snmpIcmpOutTimestamps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_timestamps")), ), snmpIpDefaultTtl: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_default_ttl")), ), snmpIpForwDatagrams: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_forw_datagrams")), ), snmpIpForwardingEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("snmp_ip_forwarding_enabled")), ), snmpIpFragCreates: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_frag_creates")), ), snmpIpFragFails: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_frag_fails")), ), snmpIpFragOks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_frag_oks")), ), snmpIpInAddrErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_addr_errors")), ), snmpIpInDelivers: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_delivers")), ), snmpIpInDiscards: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_discards")), ), snmpIpInHdrErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_hdr_errors")), ), snmpIpInReceives: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_receives")), ), snmpIpInUnknownProtos: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_unknown_protos")), ), snmpIpOutDiscards: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_out_discards")), ), snmpIpOutNoRoutes: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_out_no_routes")), ), snmpIpOutRequests: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_out_requests")), ), snmpIpReasmFails: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_fails")), ), snmpIpReasmOks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_oks")), ), snmpIpReasmReqds: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_reqds")), ), snmpIpReasmTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_timeout")), ), snmpTcpActiveOpens: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_active_opens")), ), snmpTcpAttemptFails: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_attempt_fails")), ), snmpTcpCurrEstab: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_curr_estab")), ), snmpTcpEstabResets: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_estab_resets")), ), snmpTcpInCsumErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_in_csum_errors")), ), snmpTcpInErrs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_in_errs")), ), snmpTcpInSegs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_in_segs")), ), snmpTcpMaxConn: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_max_conn")), ), snmpTcpOutRsts: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_out_rsts")), ), snmpTcpOutSegs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_out_segs")), ), snmpTcpPassiveOpens: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_passive_opens")), ), snmpTcpRetransSegs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_retrans_segs")), ), snmpTcpRtoMax: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_rto_max")), ), snmpTcpRtoMin: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_rto_min")), ), snmpUdpInDatagrams: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_in_datagrams")), ), snmpUdpInErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_in_errors")), ), snmpUdpNoPorts: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_no_ports")), ), snmpUdpOutDatagrams: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_out_datagrams")), ), systemBootTimeS: S.optional( S.NullOr(S.Number).pipe(T.Body("system_boot_time_s")), ), thermals: S.optional(S.NullOr(ConnectorsSnapshotsGetResponseThermalsList)), tunnels: S.optional(S.NullOr(ConnectorsSnapshotsGetResponseTunnelsList)), uptimeIdleMs: S.optional(S.NullOr(S.Number).pipe(T.Body("uptime_idle_ms"))), uptimeTotalMs: S.optional( S.NullOr(S.Number).pipe(T.Body("uptime_total_ms")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConnectorSnapshotResponse", }) as any as S.Schema; export interface GetGreTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ greTunnelId: string; xMagicNewHcTarget?: boolean; } export const GetGreTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), greTunnelId: S.String.pipe(T.Label("gre_tunnel_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetGreTunnelRequest", }) as any as S.Schema; export type GreTunnelsGetResponseGreTunnelBgpExtraPrefixesList = Array; export const GreTunnelsGetResponseGreTunnelBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsGetResponseGreTunnelBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsGetResponseGreTunnelBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const GreTunnelsGetResponseGreTunnelBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr(GreTunnelsGetResponseGreTunnelBgpExtraPrefixesList).pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsGetResponseGreTunnelBgp", }) as any as S.Schema; export type GreTunnelsGetResponseGreTunnelBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const GreTunnelsGetResponseGreTunnelBgpStatusState = /*@__PURE__*/ S.String; export interface GreTunnelsGetResponseGreTunnelBgpStatus { state: GreTunnelsGetResponseGreTunnelBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const GreTunnelsGetResponseGreTunnelBgpStatus = /*@__PURE__*/ S.suspend( () => S.Struct({ state: GreTunnelsGetResponseGreTunnelBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "GreTunnelsGetResponseGreTunnelBgpStatus", }) as any as S.Schema; export type GreTunnelsGetResponseGreTunnelHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsGetResponseGreTunnelHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsGetResponseGreTunnelHealthCheckRate = | "low" | "mid" | "high"; export const GreTunnelsGetResponseGreTunnelHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsGetResponseGreTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsGetResponseGreTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsGetResponseGreTunnelHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsGetResponseGreTunnelHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsGetResponseGreTunnelHealthCheckType = "reply" | "request"; export const GreTunnelsGetResponseGreTunnelHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsGetResponseGreTunnelHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsGetResponseGreTunnelHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsGetResponseGreTunnelHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsGetResponseGreTunnelHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsGetResponseGreTunnelHealthCheckType | null; } export const GreTunnelsGetResponseGreTunnelHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(GreTunnelsGetResponseGreTunnelHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional(S.NullOr(GreTunnelsGetResponseGreTunnelHealthCheckRate)), target: S.optional( S.NullOr(GreTunnelsGetResponseGreTunnelHealthCheckTarget), ), type: S.optional(S.NullOr(GreTunnelsGetResponseGreTunnelHealthCheckType)), }), ).annotate({ identifier: "GreTunnelsGetResponseGreTunnelHealthCheck", }) as any as S.Schema; export interface GreTunnelsGetResponseGreTunnel { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: GreTunnelsGetResponseGreTunnelBgp | null; bgpStatus?: GreTunnelsGetResponseGreTunnelBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the GRE tunnel. */ description?: string | null; healthCheck?: GreTunnelsGetResponseGreTunnelHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number | null; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number | null; } export const GreTunnelsGetResponseGreTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(GreTunnelsGetResponseGreTunnelBgp)), bgpStatus: S.optional( S.NullOr(GreTunnelsGetResponseGreTunnelBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(GreTunnelsGetResponseGreTunnelHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "GreTunnelsGetResponseGreTunnel", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetGreTunnelResponse { greTunnel?: GreTunnelsGetResponseGreTunnel | null; } export const GetGreTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ greTunnel: S.optional( S.NullOr(GreTunnelsGetResponseGreTunnel).pipe(T.Body("gre_tunnel")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetGreTunnelResponse", }) as any as S.Schema; export interface GetIpsecTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ ipsecTunnelId: string; xMagicNewHcTarget?: boolean; } export const GetIpsecTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ipsecTunnelId: S.String.pipe(T.Label("ipsec_tunnel_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetIpsecTunnelRequest", }) as any as S.Schema; export type IpsecTunnelsGetResponseIpsecTunnelBgpExtraPrefixesList = Array; export const IpsecTunnelsGetResponseIpsecTunnelBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsGetResponseIpsecTunnelBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsGetResponseIpsecTunnelBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const IpsecTunnelsGetResponseIpsecTunnelBgp = /*@__PURE__*/ S.suspend( () => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelBgpExtraPrefixesList).pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsGetResponseIpsecTunnelBgp", }) as any as S.Schema; export type IpsecTunnelsGetResponseIpsecTunnelBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const IpsecTunnelsGetResponseIpsecTunnelBgpStatusState = /*@__PURE__*/ S.String; export interface IpsecTunnelsGetResponseIpsecTunnelBgpStatus { state: IpsecTunnelsGetResponseIpsecTunnelBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const IpsecTunnelsGetResponseIpsecTunnelBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: IpsecTunnelsGetResponseIpsecTunnelBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "IpsecTunnelsGetResponseIpsecTunnelBgpStatus", }) as any as S.Schema; export type IpsecTunnelsGetResponseIpsecTunnelCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export const IpsecTunnelsGetResponseIpsecTunnelCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export type IpsecTunnelsGetResponseIpsecTunnelHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsGetResponseIpsecTunnelHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsGetResponseIpsecTunnelHealthCheckRate = | "low" | "mid" | "high"; export const IpsecTunnelsGetResponseIpsecTunnelHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsGetResponseIpsecTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsGetResponseIpsecTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsGetResponseIpsecTunnelHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsGetResponseIpsecTunnelHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsGetResponseIpsecTunnelHealthCheckType = | "reply" | "request"; export const IpsecTunnelsGetResponseIpsecTunnelHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsGetResponseIpsecTunnelHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsGetResponseIpsecTunnelHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsGetResponseIpsecTunnelHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsGetResponseIpsecTunnelHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsGetResponseIpsecTunnelHealthCheckType | null; } export const IpsecTunnelsGetResponseIpsecTunnelHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelHealthCheckRate), ), target: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelHealthCheckTarget), ), type: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelHealthCheckType), ), }), ).annotate({ identifier: "IpsecTunnelsGetResponseIpsecTunnelHealthCheck", }) as any as S.Schema; export type IpsecTunnelsGetResponseIpsecTunnelPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsGetResponseIpsecTunnelPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export interface IpsecTunnelsGetResponseIpsecTunnel { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel (Phase 2). */ allowNullCipher?: boolean | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: IpsecTunnelsGetResponseIpsecTunnelBgp | null; bgpStatus?: IpsecTunnelsGetResponseIpsecTunnelBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; customRemoteIdentities?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities | null; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string | null; /** An optional description forthe IPsec tunnel. */ description?: string | null; healthCheck?: IpsecTunnelsGetResponseIpsecTunnelHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean | null; } export const IpsecTunnelsGetResponseIpsecTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, allowNullCipher: S.optional( S.NullOr(S.Boolean).pipe(T.Body("allow_null_cipher")), ), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(IpsecTunnelsGetResponseIpsecTunnelBgp)), bgpStatus: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), customRemoteIdentities: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities, ).pipe(T.Body("custom_remote_identities")), ), customerEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("customer_endpoint")), ), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnelHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), replayProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("replay_protection")), ), }), ).annotate({ identifier: "IpsecTunnelsGetResponseIpsecTunnel", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetIpsecTunnelResponse { ipsecTunnel?: IpsecTunnelsGetResponseIpsecTunnel | null; } export const GetIpsecTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ ipsecTunnel: S.optional( S.NullOr(IpsecTunnelsGetResponseIpsecTunnel).pipe(T.Body("ipsec_tunnel")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetIpsecTunnelResponse", }) as any as S.Schema; export interface GetPcapRequest { /** Identifier. */ accountId: string; /** Identifier. */ pcapId: string; } export const GetPcapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), pcapId: S.String.pipe(T.Label("pcap_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/pcaps/{pcap_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPcapRequest" }) as any as S.Schema; export type PcapsGetResultPCAPFilterV1 = PcapsCreateResultPCAPFilterV1; export const PcapsGetResultPCAPFilterV1 = PcapsCreateResultPCAPFilterV1; export type PcapsGetResultPCAPStatus = | "unknown" | "success" | "pending" | "running" | "conversion_pending" | "conversion_running" | "complete" | "failed"; export const PcapsGetResultPCAPStatus = /*@__PURE__*/ S.String; export type PcapsGetResultPCAPSystem = "magic-transit"; export const PcapsGetResultPCAPSystem = /*@__PURE__*/ S.String; export type PcapsGetResultPCAPType = "simple" | "full"; export const PcapsGetResultPCAPType = /*@__PURE__*/ S.String; export interface PcapsGetResultPCAP { /** The ID for the packet capture. */ id?: string | null; /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateResultPCAPFilterV1 | null; /** The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request. */ offsetTime?: string | null; /** The status of the packet capture request. */ status?: PcapsGetResultPCAPStatus | null; /** The RFC 3339 timestamp when the packet capture was created. */ submitted?: string | null; /** The system used to collect packet captures. */ system?: PcapsGetResultPCAPSystem | null; /** The packet capture duration in seconds. */ timeLimit?: number | null; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type?: PcapsGetResultPCAPType | null; } export const PcapsGetResultPCAP = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), filterV1: S.optional( S.NullOr(PcapsCreateResultPCAPFilterV1).pipe(T.Body("filter_v1")), ), offsetTime: S.optional(S.NullOr(S.String).pipe(T.Body("offset_time"))), status: S.optional(S.NullOr(PcapsGetResultPCAPStatus)), submitted: S.optional(S.NullOr(S.String)), system: S.optional(S.NullOr(PcapsGetResultPCAPSystem)), timeLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("time_limit"))), type: S.optional(S.NullOr(PcapsGetResultPCAPType)), }), ).annotate({ identifier: "PcapsGetResultPCAP", }) as any as S.Schema; export type PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullStatus = | "unknown" | "success" | "pending" | "running" | "conversion_pending" | "conversion_running" | "complete" | "failed"; export const PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullStatus = /*@__PURE__*/ S.String; export type PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullSystem = "magic-transit"; export const PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullSystem = /*@__PURE__*/ S.String; export type PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullType = | "simple" | "full"; export const PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullType = /*@__PURE__*/ S.String; export interface PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFull { /** The ID for the packet capture. */ id?: string | null; /** The maximum number of bytes to capture. This field only applies to `full` packet captures. */ byteLimit?: number | null; /** The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to `full` packet captures. */ coloName?: string | null; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf?: string | null; /** An error message that describes why the packet capture failed. This field only applies to `full` packet captures. */ errorMessage?: string | null; /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateResultPCAPFilterV1 | null; /** The number of packets captured. */ packetsCaptured?: number | null; /** The status of the packet capture request. */ status?: PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullStatus | null; /** The RFC 3339 timestamp when stopping the packet capture was requested. This field only applies to `full` packet captures. */ stopRequested?: string | null; /** The RFC 3339 timestamp when the packet capture was created. */ submitted?: string | null; /** The system used to collect packet captures. */ system?: PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullSystem | null; /** The packet capture duration in seconds. */ timeLimit?: number | null; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type?: PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullType | null; } export const PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFull = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), byteLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("byte_limit"))), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), destinationConf: S.optional( S.NullOr(S.String).pipe(T.Body("destination_conf")), ), errorMessage: S.optional( S.NullOr(S.String).pipe(T.Body("error_message")), ), filterV1: S.optional( S.NullOr(PcapsCreateResultPCAPFilterV1).pipe(T.Body("filter_v1")), ), packetsCaptured: S.optional( S.NullOr(S.Number).pipe(T.Body("packets_captured")), ), status: S.optional( S.NullOr(PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullStatus), ), stopRequested: S.optional( S.NullOr(S.String).pipe(T.Body("stop_requested")), ), submitted: S.optional(S.NullOr(S.String)), system: S.optional( S.NullOr(PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullSystem), ), timeLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("time_limit"))), type: S.optional( S.NullOr(PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFullType), ), }), ).annotate({ identifier: "PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFull", }) as any as S.Schema; export type PcapsGetResult = | PcapsGetResultPCAP | PcapsGetResultMagicVisibilityPCAPsPCAPsResponseFull; export const PcapsGetResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "filterV1", "offsetTime", "status", "submitted", "system", "timeLimit", "type", ], [ "id", "byteLimit", "coloName", "destinationConf", "errorMessage", "filterV1", "packetsCaptured", "status", "stopRequested", "submitted", "system", "timeLimit", "type", ], ]), ); export type GetPcapResponse = PcapsGetResult; export const GetPcapResponse = /*@__PURE__*/ S.suspend(() => PcapsGetResult.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPcapResponse", }) as any as S.Schema; export interface GetPcapDownloadRequest { /** Identifier. */ accountId: string; /** Identifier. */ pcapId: string; } export const GetPcapDownloadRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), pcapId: S.String.pipe(T.Label("pcap_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/pcaps/{pcap_id}/download", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPcapDownloadRequest", }) as any as S.Schema; export interface GetPcapDownloadResponse {} export const GetPcapDownloadResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPcapDownloadResponse", }) as any as S.Schema; export interface GetPcapOwnershipRequest { /** Identifier. */ accountId: string; } export const GetPcapOwnershipRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/pcaps/ownership", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPcapOwnershipRequest", }) as any as S.Schema; export type PcapsOwnershipGetResultItemStatus = | "pending" | "success" | "failed"; export const PcapsOwnershipGetResultItemStatus = /*@__PURE__*/ S.String; export interface PcapsOwnershipGetResultItem { /** The bucket ID associated with the packet captures API. */ id: string; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf: string; /** The ownership challenge filename stored in the bucket. */ filename: string; /** The status of the ownership challenge. Can be pending, success or failed. */ status: PcapsOwnershipGetResultItemStatus; /** The RFC 3339 timestamp when the bucket was added to packet captures API. */ submitted: string; /** The RFC 3339 timestamp when the bucket was validated. */ validated?: string | null; } export const PcapsOwnershipGetResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, destinationConf: S.String.pipe(T.Body("destination_conf")), filename: S.String, status: PcapsOwnershipGetResultItemStatus, submitted: S.String, validated: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PcapsOwnershipGetResultItem", }) as any as S.Schema; export type PcapsOwnershipGetResultList = Array; export const PcapsOwnershipGetResultList = /*@__PURE__*/ S.Array( PcapsOwnershipGetResultItem, ) as any as S.Schema; export interface GetPcapOwnershipResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PcapsOwnershipGetResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const GetPcapOwnershipResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PcapsOwnershipGetResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPcapOwnershipResponse", }) as any as S.Schema; export interface GetRouteRequest { /** Identifier */ accountId: string; /** Identifier */ routeId: string; } export const GetRouteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), routeId: S.String.pipe(T.Label("route_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/routes/{route_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRouteRequest", }) as any as S.Schema; export type RoutesGetResponseRouteScopeColoNamesList = Array; export const RoutesGetResponseRouteScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesGetResponseRouteScopeColoRegionsList = Array; export const RoutesGetResponseRouteScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesGetResponseRouteScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesGetResponseRouteScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesGetResponseRouteScopeColoRegionsList | null; } export const RoutesGetResponseRouteScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( S.NullOr(RoutesGetResponseRouteScopeColoNamesList).pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( S.NullOr(RoutesGetResponseRouteScopeColoRegionsList).pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesGetResponseRouteScope", }) as any as S.Schema; export interface RoutesGetResponseRoute { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesGetResponseRouteScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const RoutesGetResponseRoute = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional(S.NullOr(RoutesGetResponseRouteScope)), weight: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RoutesGetResponseRoute", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetRouteResponse { route?: RoutesGetResponseRoute | null; } export const GetRouteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ route: S.optional(S.NullOr(RoutesGetResponseRoute)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRouteResponse", }) as any as S.Schema; export interface GetSiteRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; xMagicNewHcTarget?: boolean; } export const GetSiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteRequest" }) as any as S.Schema; export type SitesGetResponseLocation = SitesCreateResponseLocation; export const SitesGetResponseLocation = SitesCreateResponseLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSiteResponse { /** Identifier */ id?: string | null; /** Magic Connector identifier tag. */ connectorId?: string | null; description?: string | null; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean | null; /** Location of site in latitude and longitude. */ location?: SitesCreateResponseLocation | null; /** The name of the site. */ name?: string | null; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string | null; } export const GetSiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), connectorId: S.optional(S.NullOr(S.String).pipe(T.Body("connector_id"))), description: S.optional(S.NullOr(S.String)), haMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_mode"))), location: S.optional(S.NullOr(SitesCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), secondaryConnectorId: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_connector_id")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteResponse", }) as any as S.Schema; export interface GetSiteAclRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ aclId: string; } export const GetSiteAclRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), aclId: S.String.pipe(T.Label("acl_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteAclRequest", }) as any as S.Schema; export type SitesAclsGetResponseLan1PortRangesList = Array; export const SitesAclsGetResponseLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsGetResponseLan1PortsList = Array; export const SitesAclsGetResponseLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsGetResponseLan1SubnetsList = Array; export const SitesAclsGetResponseLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsGetResponseLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string | null; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsGetResponseLan1PortRangesList | null; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsGetResponseLan1PortsList | null; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsGetResponseLan1SubnetsList | null; } export const SitesAclsGetResponseLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.NullOr(S.String).pipe(T.Body("lan_name"))), portRanges: S.optional( S.NullOr(SitesAclsGetResponseLan1PortRangesList).pipe( T.Body("port_ranges"), ), ), ports: S.optional(S.NullOr(SitesAclsGetResponseLan1PortsList)), subnets: S.optional(S.NullOr(SitesAclsGetResponseLan1SubnetsList)), }), ).annotate({ identifier: "SitesAclsGetResponseLan1", }) as any as S.Schema; export type SitesAclsGetResponseProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsGetResponseProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsGetResponseProtocolsList = Array; export const SitesAclsGetResponseProtocolsList = /*@__PURE__*/ S.Array( SitesAclsGetResponseProtocolsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSiteAclResponse { /** Identifier */ id?: string | null; /** Description for the ACL. */ description?: string | null; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean | null; lan_1?: SitesAclsGetResponseLan1 | null; lan_2?: SitesAclsGetResponseLan1 | null; /** The name of the ACL. */ name?: string | null; protocols?: SitesAclsGetResponseProtocolsList | null; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean | null; } export const GetSiteAclResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), forwardLocally: S.optional( S.NullOr(S.Boolean).pipe(T.Body("forward_locally")), ), lan_1: S.optional(S.NullOr(SitesAclsGetResponseLan1)), lan_2: S.optional(S.NullOr(SitesAclsGetResponseLan1)), name: S.optional(S.NullOr(S.String)), protocols: S.optional(S.NullOr(SitesAclsGetResponseProtocolsList)), unidirectional: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteAclResponse", }) as any as S.Schema; export interface GetSiteLanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ lanId: string; } export const GetSiteLanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), lanId: S.String.pipe(T.Label("lan_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteLanRequest", }) as any as S.Schema; export type SitesLansGetResponseNat = SitesLansCreateResultItemNat; export const SitesLansGetResponseNat = SitesLansCreateResultItemNat; export type SitesLansGetResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export const SitesLansGetResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export type SitesLansGetResponseRoutedSubnetsList = Array; export const SitesLansGetResponseRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansGetResponseStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansGetResponseStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansGetResponseStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansGetResponseStaticAddressingDhcpRelayServerAddressesList | null; } export const SitesLansGetResponseStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( S.NullOr( SitesLansGetResponseStaticAddressingDhcpRelayServerAddressesList, ).pipe(T.Body("server_addresses")), ), }), ).annotate({ identifier: "SitesLansGetResponseStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItemType; /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansGetResponseStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansGetResponseStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansGetResponseStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansGetResponseStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansGetResponseStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsList | null; /** A valid IPv4 address. */ dhcpPoolEnd?: string | null; /** A valid IPv4 address. */ dhcpPoolStart?: string | null; /** A valid IPv4 address. */ dnsServer?: string | null; dnsServers?: SitesLansGetResponseStaticAddressingDhcpServerDnsServersList | null; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansGetResponseStaticAddressingDhcpServerReservationsMap | null; } export const SitesLansGetResponseStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( S.NullOr( SitesLansGetResponseStaticAddressingDhcpServerDhcpOptionsList, ).pipe(T.Body("dhcp_options")), ), dhcpPoolEnd: S.optional(S.NullOr(S.String).pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional( S.NullOr(S.String).pipe(T.Body("dhcp_pool_start")), ), dnsServer: S.optional(S.NullOr(S.String).pipe(T.Body("dns_server"))), dnsServers: S.optional( S.NullOr( SitesLansGetResponseStaticAddressingDhcpServerDnsServersList, ).pipe(T.Body("dns_servers")), ), reservations: S.optional( S.NullOr(SitesLansGetResponseStaticAddressingDhcpServerReservationsMap), ), }), ).annotate({ identifier: "SitesLansGetResponseStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansGetResponseStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansGetResponseStaticAddressingDhcpRelay | null; dhcpServer?: SitesLansGetResponseStaticAddressingDhcpServer | null; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string | null; } export const SitesLansGetResponseStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( S.NullOr(SitesLansGetResponseStaticAddressingDhcpRelay).pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( S.NullOr(SitesLansGetResponseStaticAddressingDhcpServer).pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), virtualAddress: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_address")), ), }), ).annotate({ identifier: "SitesLansGetResponseStaticAddressing", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSiteLanResponse { /** Identifier */ id?: string | null; bondId?: number | null; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean | null; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean | null; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean | null; name?: string | null; nat?: SitesLansCreateResultItemNat | null; physport?: number | null; routedSubnets?: SitesLansGetResponseRoutedSubnetsList | null; /** Identifier */ siteId?: string | null; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansGetResponseStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const GetSiteLanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), bondId: S.optional(S.NullOr(S.Number).pipe(T.Body("bond_id"))), haLink: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_link"))), isBreakout: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_breakout"))), isPrioritized: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_prioritized")), ), name: S.optional(S.NullOr(S.String)), nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), physport: S.optional(S.NullOr(S.Number)), routedSubnets: S.optional( S.NullOr(SitesLansGetResponseRoutedSubnetsList).pipe( T.Body("routed_subnets"), ), ), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesLansGetResponseStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteLanResponse", }) as any as S.Schema; export interface GetSiteWanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ wanId: string; } export const GetSiteWanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), wanId: S.String.pipe(T.Label("wan_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteWanRequest", }) as any as S.Schema; export type SitesWansGetResponseHealthCheckRate = "low" | "mid" | "high"; export const SitesWansGetResponseHealthCheckRate = /*@__PURE__*/ S.String; export type SitesWansGetResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; export const SitesWansGetResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSiteWanResponse { /** Identifier */ id?: string | null; /** Magic WAN health check rate for tunnels created on this link. The default value is `mid`. */ healthCheckRate?: SitesWansGetResponseHealthCheckRate | null; name?: string | null; physport?: number | null; /** Priority of WAN for traffic loadbalancing. */ priority?: number | null; /** Identifier */ siteId?: string | null; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const GetSiteWanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), healthCheckRate: S.optional( S.NullOr(SitesWansGetResponseHealthCheckRate).pipe( T.Body("health_check_rate"), ), ), name: S.optional(S.NullOr(S.String)), physport: S.optional(S.NullOr(S.Number)), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesWansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSiteWanResponse", }) as any as S.Schema; export interface ListAppsRequest { /** Identifier */ accountId: string; } export const ListAppsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/apps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAppsRequest", }) as any as S.Schema; export type AppsListResultItemMagicAccountAppHostnamesList = Array; export const AppsListResultItemMagicAccountAppHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsListResultItemMagicAccountAppIpSubnetsList = Array; export const AppsListResultItemMagicAccountAppIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsListResultItemMagicAccountAppSourceSubnetsList = Array; export const AppsListResultItemMagicAccountAppSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AppsListResultItemMagicAccountApp { /** Magic account app ID. */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsListResultItemMagicAccountAppHostnamesList | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsListResultItemMagicAccountAppIpSubnetsList | null; /** Display name for the app. */ name?: string | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsListResultItemMagicAccountAppSourceSubnetsList | null; /** Category of the app. */ type?: string | null; } export const AppsListResultItemMagicAccountApp = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), hostnames: S.optional( S.NullOr(AppsListResultItemMagicAccountAppHostnamesList), ), ipSubnets: S.optional( S.NullOr(AppsListResultItemMagicAccountAppIpSubnetsList).pipe( T.Body("ip_subnets"), ), ), name: S.optional(S.NullOr(S.String)), sourceSubnets: S.optional( S.NullOr(AppsListResultItemMagicAccountAppSourceSubnetsList).pipe( T.Body("source_subnets"), ), ), type: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AppsListResultItemMagicAccountApp", }) as any as S.Schema; export type AppsListResultItemMagicManagedAppHostnamesList = Array; export const AppsListResultItemMagicManagedAppHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsListResultItemMagicManagedAppIpSubnetsList = Array; export const AppsListResultItemMagicManagedAppIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsListResultItemMagicManagedAppSourceSubnetsList = Array; export const AppsListResultItemMagicManagedAppSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AppsListResultItemMagicManagedApp { /** Managed app ID. */ managedAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsListResultItemMagicManagedAppHostnamesList | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsListResultItemMagicManagedAppIpSubnetsList | null; /** Display name for the app. */ name?: string | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsListResultItemMagicManagedAppSourceSubnetsList | null; /** Category of the app. */ type?: string | null; } export const AppsListResultItemMagicManagedApp = /*@__PURE__*/ S.suspend(() => S.Struct({ managedAppId: S.String.pipe(T.Body("managed_app_id")), hostnames: S.optional( S.NullOr(AppsListResultItemMagicManagedAppHostnamesList), ), ipSubnets: S.optional( S.NullOr(AppsListResultItemMagicManagedAppIpSubnetsList).pipe( T.Body("ip_subnets"), ), ), name: S.optional(S.NullOr(S.String)), sourceSubnets: S.optional( S.NullOr(AppsListResultItemMagicManagedAppSourceSubnetsList).pipe( T.Body("source_subnets"), ), ), type: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AppsListResultItemMagicManagedApp", }) as any as S.Schema; export type AppsListResultItem = | AppsListResultItemMagicAccountApp | AppsListResultItemMagicManagedApp; export const AppsListResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accountAppId", "hostnames", "ipSubnets", "name", "sourceSubnets", "type"], ["managedAppId", "hostnames", "ipSubnets", "name", "sourceSubnets", "type"], ]), ); export type AppsListResultList = Array; export const AppsListResultList = /*@__PURE__*/ S.Array( AppsListResultItem, ) as any as S.Schema; export interface ListAppsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AppsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAppsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AppsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAppsResponse", }) as any as S.Schema; export interface ListCf1SiteRampsRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; } export const ListCf1SiteRampsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}/ramps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCf1SiteRampsRequest", }) as any as S.Schema; export type Cf1SitesRampsListResultItemType = | "gre" | "gre_interconnect" | "mpls_interconnect" | "mconn" | "ipsec"; export const Cf1SitesRampsListResultItemType = /*@__PURE__*/ S.String; export type Cf1SitesRampsListResultItemGre = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsListResultItemGre = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsListResultItemGreInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsListResultItemGreInterconnect = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsListResultItemIpsec = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsListResultItemIpsec = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsListResultItemMconn = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsListResultItemMconn = Cf1SitesRampsCreateResultItemGre; export type Cf1SitesRampsListResultItemMplsInterconnect = Cf1SitesRampsCreateResultItemGre; export const Cf1SitesRampsListResultItemMplsInterconnect = Cf1SitesRampsCreateResultItemGre; export interface Cf1SitesRampsListResultItem { /** Identifier */ id: string; createdOn: string; modifiedOn: string; /** A human-provided name describing the ramp that should be unique within the CF1 Site. */ name: string; /** The type of network connection (ramp) linking a CF1 Site to Cloudflare's network. */ type: Cf1SitesRampsListResultItemType; /** A human-provided description of the ramp. */ description?: string | null; gre?: Cf1SitesRampsCreateResultItemGre | null; greInterconnect?: Cf1SitesRampsCreateResultItemGre | null; ipsec?: Cf1SitesRampsCreateResultItemGre | null; mconn?: Cf1SitesRampsCreateResultItemGre | null; mplsInterconnect?: Cf1SitesRampsCreateResultItemGre | null; } export const Cf1SitesRampsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, type: Cf1SitesRampsListResultItemType, description: S.optional(S.NullOr(S.String)), gre: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), greInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("gre_interconnect"), ), ), ipsec: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mconn: S.optional(S.NullOr(Cf1SitesRampsCreateResultItemGre)), mplsInterconnect: S.optional( S.NullOr(Cf1SitesRampsCreateResultItemGre).pipe( T.Body("mpls_interconnect"), ), ), }), ).annotate({ identifier: "Cf1SitesRampsListResultItem", }) as any as S.Schema; export type Cf1SitesRampsListResultList = Array; export const Cf1SitesRampsListResultList = /*@__PURE__*/ S.Array( Cf1SitesRampsListResultItem, ) as any as S.Schema; export interface ListCf1SiteRampsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: Cf1SitesRampsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListCf1SiteRampsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: Cf1SitesRampsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCf1SiteRampsResponse", }) as any as S.Schema; export interface ListCf1SitesRequest { /** Identifier */ accountId: string; } export const ListCf1SitesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/cf1_sites", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCf1SitesRequest", }) as any as S.Schema; export type Cf1SitesListResultItemLocation = Cf1SitesCreateResultItemLocation; export const Cf1SitesListResultItemLocation = Cf1SitesCreateResultItemLocation; export type Cf1SitesListResultItem = Cf1SitesCreateResultItem; export const Cf1SitesListResultItem = Cf1SitesCreateResultItem; export type Cf1SitesListResultList = Array; export const Cf1SitesListResultList = /*@__PURE__*/ S.Array( Cf1SitesCreateResultItem, ) as any as S.Schema; export interface ListCf1SitesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: Cf1SitesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListCf1SitesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: Cf1SitesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCf1SitesResponse", }) as any as S.Schema; export interface ListCfInterconnectsRequest { /** Identifier */ accountId: string; xMagicNewHcTarget?: boolean; } export const ListCfInterconnectsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/cf_interconnects", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCfInterconnectsRequest", }) as any as S.Schema; export type CfInterconnectsListResponseInterconnectsItemGre = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre; export const CfInterconnectsListResponseInterconnectsItemGre = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre; export type CfInterconnectsListResponseInterconnectsItemHealthCheckRate = | "low" | "mid" | "high"; export const CfInterconnectsListResponseInterconnectsItemHealthCheckRate = /*@__PURE__*/ S.String; export type CfInterconnectsListResponseInterconnectsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsListResponseInterconnectsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type CfInterconnectsListResponseInterconnectsItemHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsListResponseInterconnectsItemHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type CfInterconnectsListResponseInterconnectsItemHealthCheckType = | "reply" | "request"; export const CfInterconnectsListResponseInterconnectsItemHealthCheckType = /*@__PURE__*/ S.String; export interface CfInterconnectsListResponseInterconnectsItemHealthCheck { /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: CfInterconnectsListResponseInterconnectsItemHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: CfInterconnectsListResponseInterconnectsItemHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: CfInterconnectsListResponseInterconnectsItemHealthCheckType | null; } export const CfInterconnectsListResponseInterconnectsItemHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(CfInterconnectsListResponseInterconnectsItemHealthCheckRate), ), target: S.optional( S.NullOr(CfInterconnectsListResponseInterconnectsItemHealthCheckTarget), ), type: S.optional( S.NullOr(CfInterconnectsListResponseInterconnectsItemHealthCheckType), ), }), ).annotate({ identifier: "CfInterconnectsListResponseInterconnectsItemHealthCheck", }) as any as S.Schema; export interface CfInterconnectsListResponseInterconnectsItem { /** Identifier */ id?: string | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ coloName?: string | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the interconnect. */ description?: string | null; /** The configuration specific to GRE interconnects. */ gre?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre | null; healthCheck?: CfInterconnectsListResponseInterconnectsItemHealthCheck | null; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress?: string | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576. */ mtu?: number | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ name?: string | null; /** An identifier that correlates this interconnect with the corresponding V2 CNI interconnect resource. */ virtualPortReservationId?: string | null; } export const CfInterconnectsListResponseInterconnectsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), gre: S.optional( S.NullOr(CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre), ), healthCheck: S.optional( S.NullOr(CfInterconnectsListResponseInterconnectsItemHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address")), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), virtualPortReservationId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_port_reservation_id")), ), }), ).annotate({ identifier: "CfInterconnectsListResponseInterconnectsItem", }) as any as S.Schema; export type CfInterconnectsListResponseInterconnectsList = Array; export const CfInterconnectsListResponseInterconnectsList = /*@__PURE__*/ S.Array( CfInterconnectsListResponseInterconnectsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListCfInterconnectsResponse { interconnects?: CfInterconnectsListResponseInterconnectsList | null; } export const ListCfInterconnectsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ interconnects: S.optional( S.NullOr(CfInterconnectsListResponseInterconnectsList), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCfInterconnectsResponse", }) as any as S.Schema; export interface ListConnectorEventLatestsRequest { /** Account identifier */ accountId: string; connectorId: string; } export const ListConnectorEventLatestsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events/latest", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorEventLatestsRequest", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEInitK = "Init"; export const ConnectorsEventsLatestListResponseItemsItemEInitK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEInit { /** Initialized process */ k: ConnectorsEventsLatestListResponseItemsItemEInitK; } export const ConnectorsEventsLatestListResponseItemsItemEInit = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEInitK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEInit", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemELeaveK = "Leave"; export const ConnectorsEventsLatestListResponseItemsItemELeaveK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemELeave { /** Stopped process */ k: ConnectorsEventsLatestListResponseItemsItemELeaveK; } export const ConnectorsEventsLatestListResponseItemsItemELeave = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemELeaveK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemELeave", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEStartAttestationK = "StartAttestation"; export const ConnectorsEventsLatestListResponseItemsItemEStartAttestationK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEStartAttestation { /** Started attestation */ k: ConnectorsEventsLatestListResponseItemsItemEStartAttestationK; } export const ConnectorsEventsLatestListResponseItemsItemEStartAttestation = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEStartAttestationK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEStartAttestation", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccessK = "FinishAttestationSuccess"; export const ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccess { /** Finished attestation */ k: ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccessK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccessK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccess", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailureK = "FinishAttestationFailure"; export const ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailure { /** Failed attestation */ k: ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailureK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailureK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailure", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKeyK = "StartRotateCryptKey"; export const ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKeyK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKey { /** Started crypt key rotation */ k: ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKeyK; } export const ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKey = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKeyK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKey", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccessK = "FinishRotateCryptKeySuccess"; export const ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccess { /** Finished crypt key rotation */ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccessK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccessK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccess", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailureK = "FinishRotateCryptKeyFailure"; export const ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailure { /** Failed crypt key rotation */ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailureK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailureK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailure", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEStartRotatePkiK = "StartRotatePki"; export const ConnectorsEventsLatestListResponseItemsItemEStartRotatePkiK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEStartRotatePki { /** Started PKI rotation */ k: ConnectorsEventsLatestListResponseItemsItemEStartRotatePkiK; } export const ConnectorsEventsLatestListResponseItemsItemEStartRotatePki = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEStartRotatePkiK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEStartRotatePki", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccessK = "FinishRotatePkiSuccess"; export const ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccess { /** Finished PKI rotation */ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccessK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccessK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccess", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailureK = "FinishRotatePkiFailure"; export const ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailure { /** Failed PKI rotation */ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailureK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailureK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailure", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEStartUpgradeK = "StartUpgrade"; export const ConnectorsEventsLatestListResponseItemsItemEStartUpgradeK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEStartUpgrade { /** Started upgrade */ k: ConnectorsEventsLatestListResponseItemsItemEStartUpgradeK; /** Location of upgrade bundle */ url: string; } export const ConnectorsEventsLatestListResponseItemsItemEStartUpgrade = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEStartUpgradeK, url: S.String, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEStartUpgrade", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccessK = "FinishUpgradeSuccess"; export const ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccessK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccess { /** Finished upgrade */ k: ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccessK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccess = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccessK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccess", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailureK = "FinishUpgradeFailure"; export const ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailureK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailure { /** Failed upgrade */ k: ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailureK; } export const ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailure = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailureK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailure", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEReconcileK = "Reconcile"; export const ConnectorsEventsLatestListResponseItemsItemEReconcileK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEReconcile { /** Reconciled */ k: ConnectorsEventsLatestListResponseItemsItemEReconcileK; } export const ConnectorsEventsLatestListResponseItemsItemEReconcile = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEReconcileK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEReconcile", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnelK = "ConfigureCloudflaredTunnel"; export const ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnelK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnel { /** Configured Cloudflared tunnel */ k: ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnelK; } export const ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnelK, }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnel", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemERekeyInstallBothK = "RekeyInstallBoth"; export const ConnectorsEventsLatestListResponseItemsItemERekeyInstallBothK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemERekeyInstallBoth { /** Installed initial inbound and outbound keys */ k: ConnectorsEventsLatestListResponseItemsItemERekeyInstallBothK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsLatestListResponseItemsItemERekeyInstallBoth = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemERekeyInstallBothK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemERekeyInstallBoth", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemERekeyStartK = "RekeyStart"; export const ConnectorsEventsLatestListResponseItemsItemERekeyStartK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemERekeyStart { /** Installed new inbound key, kept old outbound */ k: ConnectorsEventsLatestListResponseItemsItemERekeyStartK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsLatestListResponseItemsItemERekeyStart = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemERekeyStartK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemERekeyStart", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemERekeyAdvanceK = "RekeyAdvance"; export const ConnectorsEventsLatestListResponseItemsItemERekeyAdvanceK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemERekeyAdvance { /** Confirmed traffic on new inbound key, swapped outbound to new */ k: ConnectorsEventsLatestListResponseItemsItemERekeyAdvanceK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsLatestListResponseItemsItemERekeyAdvance = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemERekeyAdvanceK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemERekeyAdvance", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemERekeyCompleteK = "RekeyComplete"; export const ConnectorsEventsLatestListResponseItemsItemERekeyCompleteK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemERekeyComplete { /** Deleted old keys */ k: ConnectorsEventsLatestListResponseItemsItemERekeyCompleteK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsLatestListResponseItemsItemERekeyComplete = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemERekeyCompleteK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemERekeyComplete", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemERekeyResetK = "RekeyReset"; export const ConnectorsEventsLatestListResponseItemsItemERekeyResetK = /*@__PURE__*/ S.String; export interface ConnectorsEventsLatestListResponseItemsItemERekeyReset { /** Deleted all keys after receiving an unexpected key */ k: ConnectorsEventsLatestListResponseItemsItemERekeyResetK; /** Tunnel identifier */ tunnelId: string; } export const ConnectorsEventsLatestListResponseItemsItemERekeyReset = /*@__PURE__*/ S.suspend(() => S.Struct({ k: ConnectorsEventsLatestListResponseItemsItemERekeyResetK, tunnelId: S.String.pipe(T.Body("tunnel_id")), }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItemERekeyReset", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsItemE = | ConnectorsEventsLatestListResponseItemsItemEInit | ConnectorsEventsLatestListResponseItemsItemELeave | ConnectorsEventsLatestListResponseItemsItemEStartAttestation | ConnectorsEventsLatestListResponseItemsItemEFinishAttestationSuccess | ConnectorsEventsLatestListResponseItemsItemEFinishAttestationFailure | ConnectorsEventsLatestListResponseItemsItemEStartRotateCryptKey | ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeySuccess | ConnectorsEventsLatestListResponseItemsItemEFinishRotateCryptKeyFailure | ConnectorsEventsLatestListResponseItemsItemEStartRotatePki | ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiSuccess | ConnectorsEventsLatestListResponseItemsItemEFinishRotatePkiFailure | ConnectorsEventsLatestListResponseItemsItemEStartUpgrade | ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeSuccess | ConnectorsEventsLatestListResponseItemsItemEFinishUpgradeFailure | ConnectorsEventsLatestListResponseItemsItemEReconcile | ConnectorsEventsLatestListResponseItemsItemEConfigureCloudflaredTunnel | ConnectorsEventsLatestListResponseItemsItemERekeyInstallBoth | ConnectorsEventsLatestListResponseItemsItemERekeyStart | ConnectorsEventsLatestListResponseItemsItemERekeyAdvance | ConnectorsEventsLatestListResponseItemsItemERekeyComplete | ConnectorsEventsLatestListResponseItemsItemERekeyReset; export const ConnectorsEventsLatestListResponseItemsItemE = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k"], ["k", "url"], ["k"], ["k"], ["k"], ["k"], ["k", "tunnelId"], ["k", "tunnelId"], ["k", "tunnelId"], ["k", "tunnelId"], ["k", "tunnelId"], ]), ); export interface ConnectorsEventsLatestListResponseItemsItem { e: ConnectorsEventsLatestListResponseItemsItemE; /** Sequence number, used to order events with the same timestamp */ n: number; /** Time the Event was recorded (seconds since the Unix epoch) */ t: number; /** Version */ v?: string | null; } export const ConnectorsEventsLatestListResponseItemsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ e: ConnectorsEventsLatestListResponseItemsItemE, n: S.Number, t: S.Number, v: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ConnectorsEventsLatestListResponseItemsItem", }) as any as S.Schema; export type ConnectorsEventsLatestListResponseItemsList = Array; export const ConnectorsEventsLatestListResponseItemsList = /*@__PURE__*/ S.Array( ConnectorsEventsLatestListResponseItemsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListConnectorEventLatestsResponse { count: number; items: ConnectorsEventsLatestListResponseItemsList; } export const ListConnectorEventLatestsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ count: S.Number, items: ConnectorsEventsLatestListResponseItemsList, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorEventLatestsResponse", }) as any as S.Schema; export interface ListConnectorEventsRequest { /** Account identifier */ accountId: string; connectorId: string; from: number; to: number; cursor?: string; /** Filter by event kind */ k?: string; limit?: number; } export const ListConnectorEventsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), from: S.Number.pipe(T.Query()), to: S.Number.pipe(T.Query()), cursor: S.optional(S.String.pipe(T.Query())), k: S.optional(S.String.pipe(T.Query())), limit: S.optional(S.Number.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorEventsRequest", }) as any as S.Schema; export interface ConnectorsEventsListResponseItemsItem { /** Time the Event was collected (seconds since the Unix epoch) */ a: number; /** Kind */ k: string; /** Sequence number, used to order events with the same timestamp */ n: number; /** Time the Event was recorded (seconds since the Unix epoch) */ t: number; } export const ConnectorsEventsListResponseItemsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ a: S.Number, k: S.String, n: S.Number, t: S.Number, }), ).annotate({ identifier: "ConnectorsEventsListResponseItemsItem", }) as any as S.Schema; export type ConnectorsEventsListResponseItemsList = Array; export const ConnectorsEventsListResponseItemsList = /*@__PURE__*/ S.Array( ConnectorsEventsListResponseItemsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListConnectorEventsResponse { count: number; items: ConnectorsEventsListResponseItemsList; cursor?: string | null; } export const ListConnectorEventsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ count: S.Number, items: ConnectorsEventsListResponseItemsList, cursor: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorEventsResponse", }) as any as S.Schema; export type ConnectorsListRequestDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsListRequestDeviceType = /*@__PURE__*/ S.String; export interface ListConnectorsRequest { /** Account identifier */ accountId: string; /** Filter connectors by device type. */ deviceType?: ConnectorsListRequestDeviceType | (string & {}); } export const ListConnectorsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), deviceType: S.optional( ConnectorsListRequestDeviceType.pipe(T.Query("device_type")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorsRequest", }) as any as S.Schema; export type ConnectorsListResultItemInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsListResultItemInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsListResultItemInterruptWindowDaysOfWeekList = Array; export const ConnectorsListResultItemInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsListResultItemInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsListResultItemInterruptWindowEmbargoDatesList = Array; export const ConnectorsListResultItemInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConnectorsListResultItemDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsListResultItemDeviceType = /*@__PURE__*/ S.String; export interface ConnectorsListResultItemDevice { id: string; serialNumber?: string | null; type?: ConnectorsListResultItemDeviceType | null; } export const ConnectorsListResultItemDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), type: S.optional(S.NullOr(ConnectorsListResultItemDeviceType)), }), ).annotate({ identifier: "ConnectorsListResultItemDevice", }) as any as S.Schema; export interface ConnectorsListResultItem { id: string; activated: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek: ConnectorsListResultItemInterruptWindowDaysOfWeekList; interruptWindowDurationHours: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates: ConnectorsListResultItemInterruptWindowEmbargoDatesList; interruptWindowHourOfDay: number; lastUpdated: string; notes: string; primary: boolean; timezone: string; device?: ConnectorsListResultItemDevice | null; lastHeartbeat?: string | null; lastSeenVersion?: string | null; licenseKey?: string | null; siteId?: string | null; } export const ConnectorsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, activated: S.Boolean, interruptWindowDaysOfWeek: ConnectorsListResultItemInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), interruptWindowDurationHours: S.Number.pipe( T.Body("interrupt_window_duration_hours"), ), interruptWindowEmbargoDates: ConnectorsListResultItemInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), interruptWindowHourOfDay: S.Number.pipe( T.Body("interrupt_window_hour_of_day"), ), lastUpdated: S.String.pipe(T.Body("last_updated")), notes: S.String, primary: S.Boolean, timezone: S.String, device: S.optional(S.NullOr(ConnectorsListResultItemDevice)), lastHeartbeat: S.optional( S.NullOr(S.String).pipe(T.Body("last_heartbeat")), ), lastSeenVersion: S.optional( S.NullOr(S.String).pipe(T.Body("last_seen_version")), ), licenseKey: S.optional(S.NullOr(S.String).pipe(T.Body("license_key"))), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "ConnectorsListResultItem", }) as any as S.Schema; export type ConnectorsListResultList = Array; export const ConnectorsListResultList = /*@__PURE__*/ S.Array( ConnectorsListResultItem, ) as any as S.Schema; export interface ListConnectorsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ConnectorsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListConnectorsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ConnectorsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorsResponse", }) as any as S.Schema; export interface ListConnectorSnapshotLatestsRequest { /** Account identifier */ accountId: string; connectorId: string; } export const ListConnectorSnapshotLatestsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots/latest", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorSnapshotLatestsRequest", }) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemBondsItem = ConnectorsSnapshotsGetResponseBondsItem; export const ConnectorsSnapshotsLatestListResponseItemsItemBondsItem = ConnectorsSnapshotsGetResponseBondsItem; export type ConnectorsSnapshotsLatestListResponseItemsItemBondsList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemBondsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseBondsItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemDhcpLeasesItem = ConnectorsSnapshotsGetResponseDhcpLeasesItem; export const ConnectorsSnapshotsLatestListResponseItemsItemDhcpLeasesItem = ConnectorsSnapshotsGetResponseDhcpLeasesItem; export type ConnectorsSnapshotsLatestListResponseItemsItemDhcpLeasesList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemDhcpLeasesList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseDhcpLeasesItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemDisksItem = ConnectorsSnapshotsGetResponseDisksItem; export const ConnectorsSnapshotsLatestListResponseItemsItemDisksItem = ConnectorsSnapshotsGetResponseDisksItem; export type ConnectorsSnapshotsLatestListResponseItemsItemDisksList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemDisksList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseDisksItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItemIpAddressesItem = ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem; export const ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItemIpAddressesItem = ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem; export type ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItemIpAddressesList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItemIpAddressesList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseInterfacesItemIpAddressesItem, ) as any as S.Schema; export interface ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItem { /** Name of the network interface */ name: string; /** UP/DOWN state of the network interface */ operstate: string; ipAddresses?: ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItemIpAddressesList | null; /** Speed of the network interface (bits per second) */ speed?: number | null; } export const ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, operstate: S.String, ipAddresses: S.optional( S.NullOr( ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItemIpAddressesList, ).pipe(T.Body("ip_addresses")), ), speed: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItem", }) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemInterfacesList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemInterfacesList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsLatestListResponseItemsItemInterfacesItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemMountsItem = ConnectorsSnapshotsGetResponseMountsItem; export const ConnectorsSnapshotsLatestListResponseItemsItemMountsItem = ConnectorsSnapshotsGetResponseMountsItem; export type ConnectorsSnapshotsLatestListResponseItemsItemMountsList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemMountsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseMountsItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemNetdevsItem = ConnectorsSnapshotsGetResponseNetdevsItem; export const ConnectorsSnapshotsLatestListResponseItemsItemNetdevsItem = ConnectorsSnapshotsGetResponseNetdevsItem; export type ConnectorsSnapshotsLatestListResponseItemsItemNetdevsList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemNetdevsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseNetdevsItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemThermalsItem = ConnectorsSnapshotsGetResponseThermalsItem; export const ConnectorsSnapshotsLatestListResponseItemsItemThermalsItem = ConnectorsSnapshotsGetResponseThermalsItem; export type ConnectorsSnapshotsLatestListResponseItemsItemThermalsList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemThermalsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseThermalsItem, ) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsItemTunnelsItem = ConnectorsSnapshotsGetResponseTunnelsItem; export const ConnectorsSnapshotsLatestListResponseItemsItemTunnelsItem = ConnectorsSnapshotsGetResponseTunnelsItem; export type ConnectorsSnapshotsLatestListResponseItemsItemTunnelsList = Array; export const ConnectorsSnapshotsLatestListResponseItemsItemTunnelsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsGetResponseTunnelsItem, ) as any as S.Schema; export interface ConnectorsSnapshotsLatestListResponseItemsItem { /** Count of failures to reclaim space */ countReclaimFailures: number; /** Count of reclaimed paths */ countReclaimedPaths: number; /** Count of failed snapshot recordings */ countRecordFailed: number; /** Count of failed snapshot transmissions */ countTransmitFailures: number; /** Time the Snapshot was recorded (seconds since the Unix epoch) */ t: number; /** Version */ v: string; bonds?: ConnectorsSnapshotsLatestListResponseItemsItemBondsList | null; /** Count of processors/cores */ cpuCount?: number | null; /** Percentage of time over a 10 second window that tasks were stalled */ cpu_pressure_10s?: number | null; /** Percentage of time over a 5 minute window that tasks were stalled */ cpu_pressure_300s?: number | null; /** Percentage of time over a 1 minute window that tasks were stalled */ cpu_pressure_60s?: number | null; /** Total stall time (microseconds) */ cpuPressureTotalUs?: number | null; /** Time spent running a virtual CPU or guest OS (milliseconds) */ cpuTimeGuestMs?: number | null; /** Time spent running a niced guest (milliseconds) */ cpuTimeGuestNiceMs?: number | null; /** Time spent in idle state (milliseconds) */ cpuTimeIdleMs?: number | null; /** Time spent wait for I/O to complete (milliseconds) */ cpuTimeIowaitMs?: number | null; /** Time spent servicing interrupts (milliseconds) */ cpuTimeIrqMs?: number | null; /** Time spent in low-priority user mode (milliseconds) */ cpuTimeNiceMs?: number | null; /** Time spent servicing softirqs (milliseconds) */ cpuTimeSoftirqMs?: number | null; /** Time stolen (milliseconds) */ cpuTimeStealMs?: number | null; /** Time spent in system mode (milliseconds) */ cpuTimeSystemMs?: number | null; /** Time spent in user mode (milliseconds) */ cpuTimeUserMs?: number | null; /** Number of network operations applied during state transition */ delta?: number | null; dhcpLeases?: ConnectorsSnapshotsLatestListResponseItemsItemDhcpLeasesList | null; disks?: ConnectorsSnapshotsLatestListResponseItemsItemDisksList | null; /** Simulated number of network operations applied during state transition */ epsilon?: number | null; /** Name of high availability state */ haState?: string | null; /** Numeric value associated with high availability state (0 = disabled, 1 = active, 2 = standby, 3 = stopped, 4 = fault) */ haValue?: number | null; interfaces?: ConnectorsSnapshotsLatestListResponseItemsItemInterfacesList | null; /** Percentage of time over a 10 second window that all tasks were stalled */ io_pressure_full_10s?: number | null; /** Percentage of time over a 5 minute window that all tasks were stalled */ io_pressure_full_300s?: number | null; /** Percentage of time over a 1 minute window that all tasks were stalled */ io_pressure_full_60s?: number | null; /** Total stall time (microseconds) */ ioPressureFullTotalUs?: number | null; /** Percentage of time over a 10 second window that some tasks were stalled */ io_pressure_some_10s?: number | null; /** Percentage of time over a 3 minute window that some tasks were stalled */ io_pressure_some_300s?: number | null; /** Percentage of time over a 1 minute window that some tasks were stalled */ io_pressure_some_60s?: number | null; /** Total stall time (microseconds) */ ioPressureSomeTotalUs?: number | null; /** Boot time (seconds since Unix epoch) */ kernelBtime?: number | null; /** Number of context switches that the system underwent */ kernelCtxt?: number | null; /** Number of forks since boot */ kernelProcesses?: number | null; /** Number of processes blocked waiting for I/O */ kernelProcessesBlocked?: number | null; /** Number of processes in runnable state */ kernelProcessesRunning?: number | null; /** The fifteen-minute load average */ load_average_15m?: number | null; /** The one-minute load average */ load_average_1m?: number | null; /** The five-minute load average */ load_average_5m?: number | null; /** Number of currently runnable kernel scheduling entities */ loadAverageCur?: number | null; /** Number of kernel scheduling entities that currently exist on the system */ loadAverageMax?: number | null; /** Memory that has been used more recently */ memoryActiveBytes?: number | null; /** Non-file backed huge pages mapped into user-space page tables */ memoryAnonHugepagesBytes?: number | null; /** Non-file backed pages mapped into user-space page tables */ memoryAnonPagesBytes?: number | null; /** Estimate of how much memory is available for starting new applications */ memoryAvailableBytes?: number | null; /** Memory used for block device bounce buffers */ memoryBounceBytes?: number | null; /** Relatively temporary storage for raw disk blocks */ memoryBuffersBytes?: number | null; /** In-memory cache for files read from the disk */ memoryCachedBytes?: number | null; /** Free CMA (Contiguous Memory Allocator) pages */ memoryCmaFreeBytes?: number | null; /** Total CMA (Contiguous Memory Allocator) pages */ memoryCmaTotalBytes?: number | null; /** Total amount of memory currently available to be allocated on the system */ memoryCommitLimitBytes?: number | null; /** Amount of memory presently allocated on the system */ memoryCommittedAsBytes?: number | null; /** Memory which is waiting to get written back to the disk */ memoryDirtyBytes?: number | null; /** The sum of LowFree and HighFree */ memoryFreeBytes?: number | null; /** Amount of free highmem */ memoryHighFreeBytes?: number | null; /** Total amount of highmem */ memoryHighTotalBytes?: number | null; /** The number of huge pages in the pool that are not yet allocated */ memoryHugepagesFree?: number | null; /** Number of huge pages for which a commitment has been made, but no allocation has yet been made */ memoryHugepagesRsvd?: number | null; /** Number of huge pages in the pool above the threshold */ memoryHugepagesSurp?: number | null; /** The size of the pool of huge pages */ memoryHugepagesTotal?: number | null; /** The size of huge pages */ memoryHugepagesizeBytes?: number | null; /** Memory which has been less recently used */ memoryInactiveBytes?: number | null; /** Kernel allocations that the kernel will attempt to reclaim under memory pressure */ memoryKReclaimableBytes?: number | null; /** Amount of memory allocated to kernel stacks */ memoryKernelStackBytes?: number | null; /** Amount of free lowmem */ memoryLowFreeBytes?: number | null; /** Total amount of lowmem */ memoryLowTotalBytes?: number | null; /** Files which have been mapped into memory */ memoryMappedBytes?: number | null; /** Amount of memory dedicated to the lowest level of page tables */ memoryPageTablesBytes?: number | null; /** Memory allocated to the per-cpu alloctor used to back per-cpu allocations */ memoryPerCpuBytes?: number | null; /** Percentage of time over a 10 second window that all tasks were stalled */ memory_pressure_full_10s?: number | null; /** Percentage of time over a 5 minute window that all tasks were stalled */ memory_pressure_full_300s?: number | null; /** Percentage of time over a 1 minute window that all tasks were stalled */ memory_pressure_full_60s?: number | null; /** Total stall time (microseconds) */ memoryPressureFullTotalUs?: number | null; /** Percentage of time over a 10 second window that some tasks were stalled */ memory_pressure_some_10s?: number | null; /** Percentage of time over a 5 minute window that some tasks were stalled */ memory_pressure_some_300s?: number | null; /** Percentage of time over a 1 minute window that some tasks were stalled */ memory_pressure_some_60s?: number | null; /** Total stall time (microseconds) */ memoryPressureSomeTotalUs?: number | null; /** Part of slab that can be reclaimed on memory pressure */ memorySReclaimableBytes?: number | null; /** Part of slab that cannot be reclaimed on memory pressure */ memorySUnreclaimBytes?: number | null; /** Amount of memory dedicated to the lowest level of page tables */ memorySecondaryPageTablesBytes?: number | null; /** Amount of memory consumed by tmpfs */ memoryShmemBytes?: number | null; /** Memory used by shmem and tmpfs, allocated with huge pages */ memoryShmemHugepagesBytes?: number | null; /** Shared memory mapped into user space with huge pages */ memoryShmemPmdMappedBytes?: number | null; /** In-kernel data structures cache */ memorySlabBytes?: number | null; /** Memory swapped out and back in while still in swap file */ memorySwapCachedBytes?: number | null; /** Amount of swap space that is currently unused */ memorySwapFreeBytes?: number | null; /** Total amount of swap space available */ memorySwapTotalBytes?: number | null; /** Total usable RAM */ memoryTotalBytes?: number | null; /** Largest contiguous block of vmalloc area which is free */ memoryVmallocChunkBytes?: number | null; /** Total size of vmalloc memory area */ memoryVmallocTotalBytes?: number | null; /** Amount of vmalloc area which is used */ memoryVmallocUsedBytes?: number | null; /** Memory which is actively being written back to the disk */ memoryWritebackBytes?: number | null; /** Memory used by FUSE for temporary writeback buffers */ memoryWritebackTmpBytes?: number | null; /** Memory consumed by the zswap backend, compressed */ memoryZSwapBytes?: number | null; /** Amount of anonymous memory stored in zswap, uncompressed */ memoryZSwappedBytes?: number | null; mounts?: ConnectorsSnapshotsLatestListResponseItemsItemMountsList | null; netdevs?: ConnectorsSnapshotsLatestListResponseItemsItemNetdevsList | null; /** Platform identifier */ platform?: string | null; /** Number of ICMP Address Mask Reply messages received */ snmpIcmpInAddrMaskReps?: number | null; /** Number of ICMP Address Mask Request messages received */ snmpIcmpInAddrMasks?: number | null; /** Number of ICMP messages received with bad checksums */ snmpIcmpInCsumErrors?: number | null; /** Number of ICMP Destination Unreachable messages received */ snmpIcmpInDestUnreachs?: number | null; /** Number of ICMP Echo Reply messages received */ snmpIcmpInEchoReps?: number | null; /** Number of ICMP Echo (request) messages received */ snmpIcmpInEchos?: number | null; /** Number of ICMP messages received with ICMP-specific errors */ snmpIcmpInErrors?: number | null; /** Number of ICMP messages received */ snmpIcmpInMsgs?: number | null; /** Number of ICMP Parameter Problem messages received */ snmpIcmpInParmProbs?: number | null; /** Number of ICMP Redirect messages received */ snmpIcmpInRedirects?: number | null; /** Number of ICMP Source Quench messages received */ snmpIcmpInSrcQuenchs?: number | null; /** Number of ICMP Time Exceeded messages received */ snmpIcmpInTimeExcds?: number | null; /** Number of ICMP Address Mask Request messages received */ snmpIcmpInTimestampReps?: number | null; /** Number of ICMP Timestamp (request) messages received */ snmpIcmpInTimestamps?: number | null; /** Number of ICMP Address Mask Reply messages sent */ snmpIcmpOutAddrMaskReps?: number | null; /** Number of ICMP Address Mask Request messages sent */ snmpIcmpOutAddrMasks?: number | null; /** Number of ICMP Destination Unreachable messages sent */ snmpIcmpOutDestUnreachs?: number | null; /** Number of ICMP Echo Reply messages sent */ snmpIcmpOutEchoReps?: number | null; /** Number of ICMP Echo (request) messages sent */ snmpIcmpOutEchos?: number | null; /** Number of ICMP messages which this entity did not send due to ICMP-specific errors */ snmpIcmpOutErrors?: number | null; /** Number of ICMP messages attempted to send */ snmpIcmpOutMsgs?: number | null; /** Number of ICMP Parameter Problem messages sent */ snmpIcmpOutParmProbs?: number | null; /** Number of ICMP Redirect messages sent */ snmpIcmpOutRedirects?: number | null; /** Number of ICMP Source Quench messages sent */ snmpIcmpOutSrcQuenchs?: number | null; /** Number of ICMP Time Exceeded messages sent */ snmpIcmpOutTimeExcds?: number | null; /** Number of ICMP Timestamp Reply messages sent */ snmpIcmpOutTimestampReps?: number | null; /** Number of ICMP Timestamp (request) messages sent */ snmpIcmpOutTimestamps?: number | null; /** Default value of the Time-To-Live field of the IP header */ snmpIpDefaultTtl?: number | null; /** Number of datagrams forwarded to their final destination */ snmpIpForwDatagrams?: number | null; /** Set when acting as an IP gateway */ snmpIpForwardingEnabled?: boolean | null; /** Number of datagrams generated by fragmentation */ snmpIpFragCreates?: number | null; /** Number of datagrams discarded because fragmentation failed */ snmpIpFragFails?: number | null; /** Number of datagrams successfully fragmented */ snmpIpFragOks?: number | null; /** Number of input datagrams discarded due to errors in the IP address */ snmpIpInAddrErrors?: number | null; /** Number of input datagrams successfully delivered to IP user-protocols */ snmpIpInDelivers?: number | null; /** Number of input datagrams otherwise discarded */ snmpIpInDiscards?: number | null; /** Number of input datagrams discarded due to errors in the IP header */ snmpIpInHdrErrors?: number | null; /** Number of input datagrams received from interfaces */ snmpIpInReceives?: number | null; /** Number of input datagrams discarded due unknown or unsupported protocol */ snmpIpInUnknownProtos?: number | null; /** Number of output datagrams otherwise discarded */ snmpIpOutDiscards?: number | null; /** Number of output datagrams discarded because no route matched */ snmpIpOutNoRoutes?: number | null; /** Number of datagrams supplied for transmission */ snmpIpOutRequests?: number | null; /** Number of failures detected by the reassembly algorithm */ snmpIpReasmFails?: number | null; /** Number of datagrams successfully reassembled */ snmpIpReasmOks?: number | null; /** Number of fragments received which needed to be reassembled */ snmpIpReasmReqds?: number | null; /** Number of seconds fragments are held while awaiting reassembly */ snmpIpReasmTimeout?: number | null; /** Number of times TCP transitions to SYN-SENT from CLOSED */ snmpTcpActiveOpens?: number | null; /** Number of times TCP transitions to CLOSED from SYN-SENT or SYN-RCVD, plus transitions to LISTEN from SYN-RCVD */ snmpTcpAttemptFails?: number | null; /** Number of TCP connections in ESTABLISHED or CLOSE-WAIT */ snmpTcpCurrEstab?: number | null; /** Number of times TCP transitions to CLOSED from ESTABLISHED or CLOSE-WAIT */ snmpTcpEstabResets?: number | null; /** Number of TCP segments received with checksum errors */ snmpTcpInCsumErrors?: number | null; /** Number of TCP segments received in error */ snmpTcpInErrs?: number | null; /** Number of TCP segments received */ snmpTcpInSegs?: number | null; /** Limit on the total number of TCP connections */ snmpTcpMaxConn?: number | null; /** Number of TCP segments sent with RST flag */ snmpTcpOutRsts?: number | null; /** Number of TCP segments sent */ snmpTcpOutSegs?: number | null; /** Number of times TCP transitions to SYN-RCVD from LISTEN */ snmpTcpPassiveOpens?: number | null; /** Number of TCP segments retransmitted */ snmpTcpRetransSegs?: number | null; /** Maximum value permitted by a TCP implementation for the retransmission timeout (milliseconds) */ snmpTcpRtoMax?: number | null; /** Minimum value permitted by a TCP implementation for the retransmission timeout (milliseconds) */ snmpTcpRtoMin?: number | null; /** Number of UDP datagrams delivered to UDP applications */ snmpUdpInDatagrams?: number | null; /** Number of UDP datagrams failed to be delivered for reasons other than lack of application at the destination port */ snmpUdpInErrors?: number | null; /** Number of UDP datagrams received for which there was not application at the destination port */ snmpUdpNoPorts?: number | null; /** Number of UDP datagrams sent */ snmpUdpOutDatagrams?: number | null; /** Boottime of the system (seconds since the Unix epoch) */ systemBootTimeS?: number | null; thermals?: ConnectorsSnapshotsLatestListResponseItemsItemThermalsList | null; tunnels?: ConnectorsSnapshotsLatestListResponseItemsItemTunnelsList | null; /** Sum of how much time each core has spent idle */ uptimeIdleMs?: number | null; /** Uptime of the system, including time spent in suspend */ uptimeTotalMs?: number | null; } export const ConnectorsSnapshotsLatestListResponseItemsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ countReclaimFailures: S.Number.pipe(T.Body("count_reclaim_failures")), countReclaimedPaths: S.Number.pipe(T.Body("count_reclaimed_paths")), countRecordFailed: S.Number.pipe(T.Body("count_record_failed")), countTransmitFailures: S.Number.pipe(T.Body("count_transmit_failures")), t: S.Number, v: S.String, bonds: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemBondsList), ), cpuCount: S.optional(S.NullOr(S.Number).pipe(T.Body("cpu_count"))), cpu_pressure_10s: S.optional(S.NullOr(S.Number)), cpu_pressure_300s: S.optional(S.NullOr(S.Number)), cpu_pressure_60s: S.optional(S.NullOr(S.Number)), cpuPressureTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_pressure_total_us")), ), cpuTimeGuestMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_guest_ms")), ), cpuTimeGuestNiceMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_guest_nice_ms")), ), cpuTimeIdleMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_idle_ms")), ), cpuTimeIowaitMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_iowait_ms")), ), cpuTimeIrqMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_irq_ms")), ), cpuTimeNiceMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_nice_ms")), ), cpuTimeSoftirqMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_softirq_ms")), ), cpuTimeStealMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_steal_ms")), ), cpuTimeSystemMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_system_ms")), ), cpuTimeUserMs: S.optional( S.NullOr(S.Number).pipe(T.Body("cpu_time_user_ms")), ), delta: S.optional(S.NullOr(S.Number)), dhcpLeases: S.optional( S.NullOr( ConnectorsSnapshotsLatestListResponseItemsItemDhcpLeasesList, ).pipe(T.Body("dhcp_leases")), ), disks: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemDisksList), ), epsilon: S.optional(S.NullOr(S.Number)), haState: S.optional(S.NullOr(S.String).pipe(T.Body("ha_state"))), haValue: S.optional(S.NullOr(S.Number).pipe(T.Body("ha_value"))), interfaces: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemInterfacesList), ), io_pressure_full_10s: S.optional(S.NullOr(S.Number)), io_pressure_full_300s: S.optional(S.NullOr(S.Number)), io_pressure_full_60s: S.optional(S.NullOr(S.Number)), ioPressureFullTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("io_pressure_full_total_us")), ), io_pressure_some_10s: S.optional(S.NullOr(S.Number)), io_pressure_some_300s: S.optional(S.NullOr(S.Number)), io_pressure_some_60s: S.optional(S.NullOr(S.Number)), ioPressureSomeTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("io_pressure_some_total_us")), ), kernelBtime: S.optional(S.NullOr(S.Number).pipe(T.Body("kernel_btime"))), kernelCtxt: S.optional(S.NullOr(S.Number).pipe(T.Body("kernel_ctxt"))), kernelProcesses: S.optional( S.NullOr(S.Number).pipe(T.Body("kernel_processes")), ), kernelProcessesBlocked: S.optional( S.NullOr(S.Number).pipe(T.Body("kernel_processes_blocked")), ), kernelProcessesRunning: S.optional( S.NullOr(S.Number).pipe(T.Body("kernel_processes_running")), ), load_average_15m: S.optional(S.NullOr(S.Number)), load_average_1m: S.optional(S.NullOr(S.Number)), load_average_5m: S.optional(S.NullOr(S.Number)), loadAverageCur: S.optional( S.NullOr(S.Number).pipe(T.Body("load_average_cur")), ), loadAverageMax: S.optional( S.NullOr(S.Number).pipe(T.Body("load_average_max")), ), memoryActiveBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_active_bytes")), ), memoryAnonHugepagesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_anon_hugepages_bytes")), ), memoryAnonPagesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_anon_pages_bytes")), ), memoryAvailableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_available_bytes")), ), memoryBounceBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_bounce_bytes")), ), memoryBuffersBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_buffers_bytes")), ), memoryCachedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_cached_bytes")), ), memoryCmaFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_cma_free_bytes")), ), memoryCmaTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_cma_total_bytes")), ), memoryCommitLimitBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_commit_limit_bytes")), ), memoryCommittedAsBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_committed_as_bytes")), ), memoryDirtyBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_dirty_bytes")), ), memoryFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_free_bytes")), ), memoryHighFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_high_free_bytes")), ), memoryHighTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_high_total_bytes")), ), memoryHugepagesFree: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_free")), ), memoryHugepagesRsvd: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_rsvd")), ), memoryHugepagesSurp: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_surp")), ), memoryHugepagesTotal: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepages_total")), ), memoryHugepagesizeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_hugepagesize_bytes")), ), memoryInactiveBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_inactive_bytes")), ), memoryKReclaimableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_k_reclaimable_bytes")), ), memoryKernelStackBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_kernel_stack_bytes")), ), memoryLowFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_low_free_bytes")), ), memoryLowTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_low_total_bytes")), ), memoryMappedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_mapped_bytes")), ), memoryPageTablesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_page_tables_bytes")), ), memoryPerCpuBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_per_cpu_bytes")), ), memory_pressure_full_10s: S.optional(S.NullOr(S.Number)), memory_pressure_full_300s: S.optional(S.NullOr(S.Number)), memory_pressure_full_60s: S.optional(S.NullOr(S.Number)), memoryPressureFullTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_pressure_full_total_us")), ), memory_pressure_some_10s: S.optional(S.NullOr(S.Number)), memory_pressure_some_300s: S.optional(S.NullOr(S.Number)), memory_pressure_some_60s: S.optional(S.NullOr(S.Number)), memoryPressureSomeTotalUs: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_pressure_some_total_us")), ), memorySReclaimableBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_s_reclaimable_bytes")), ), memorySUnreclaimBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_s_unreclaim_bytes")), ), memorySecondaryPageTablesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_secondary_page_tables_bytes")), ), memoryShmemBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_shmem_bytes")), ), memoryShmemHugepagesBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_shmem_hugepages_bytes")), ), memoryShmemPmdMappedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_shmem_pmd_mapped_bytes")), ), memorySlabBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_slab_bytes")), ), memorySwapCachedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_swap_cached_bytes")), ), memorySwapFreeBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_swap_free_bytes")), ), memorySwapTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_swap_total_bytes")), ), memoryTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_total_bytes")), ), memoryVmallocChunkBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_vmalloc_chunk_bytes")), ), memoryVmallocTotalBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_vmalloc_total_bytes")), ), memoryVmallocUsedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_vmalloc_used_bytes")), ), memoryWritebackBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_writeback_bytes")), ), memoryWritebackTmpBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_writeback_tmp_bytes")), ), memoryZSwapBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_z_swap_bytes")), ), memoryZSwappedBytes: S.optional( S.NullOr(S.Number).pipe(T.Body("memory_z_swapped_bytes")), ), mounts: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemMountsList), ), netdevs: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemNetdevsList), ), platform: S.optional(S.NullOr(S.String)), snmpIcmpInAddrMaskReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_addr_mask_reps")), ), snmpIcmpInAddrMasks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_addr_masks")), ), snmpIcmpInCsumErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_csum_errors")), ), snmpIcmpInDestUnreachs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_dest_unreachs")), ), snmpIcmpInEchoReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_echo_reps")), ), snmpIcmpInEchos: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_echos")), ), snmpIcmpInErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_errors")), ), snmpIcmpInMsgs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_msgs")), ), snmpIcmpInParmProbs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_parm_probs")), ), snmpIcmpInRedirects: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_redirects")), ), snmpIcmpInSrcQuenchs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_src_quenchs")), ), snmpIcmpInTimeExcds: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_time_excds")), ), snmpIcmpInTimestampReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_timestamp_reps")), ), snmpIcmpInTimestamps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_in_timestamps")), ), snmpIcmpOutAddrMaskReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_addr_mask_reps")), ), snmpIcmpOutAddrMasks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_addr_masks")), ), snmpIcmpOutDestUnreachs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_dest_unreachs")), ), snmpIcmpOutEchoReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_echo_reps")), ), snmpIcmpOutEchos: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_echos")), ), snmpIcmpOutErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_errors")), ), snmpIcmpOutMsgs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_msgs")), ), snmpIcmpOutParmProbs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_parm_probs")), ), snmpIcmpOutRedirects: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_redirects")), ), snmpIcmpOutSrcQuenchs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_src_quenchs")), ), snmpIcmpOutTimeExcds: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_time_excds")), ), snmpIcmpOutTimestampReps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_timestamp_reps")), ), snmpIcmpOutTimestamps: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_icmp_out_timestamps")), ), snmpIpDefaultTtl: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_default_ttl")), ), snmpIpForwDatagrams: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_forw_datagrams")), ), snmpIpForwardingEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("snmp_ip_forwarding_enabled")), ), snmpIpFragCreates: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_frag_creates")), ), snmpIpFragFails: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_frag_fails")), ), snmpIpFragOks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_frag_oks")), ), snmpIpInAddrErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_addr_errors")), ), snmpIpInDelivers: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_delivers")), ), snmpIpInDiscards: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_discards")), ), snmpIpInHdrErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_hdr_errors")), ), snmpIpInReceives: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_receives")), ), snmpIpInUnknownProtos: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_in_unknown_protos")), ), snmpIpOutDiscards: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_out_discards")), ), snmpIpOutNoRoutes: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_out_no_routes")), ), snmpIpOutRequests: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_out_requests")), ), snmpIpReasmFails: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_fails")), ), snmpIpReasmOks: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_oks")), ), snmpIpReasmReqds: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_reqds")), ), snmpIpReasmTimeout: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_ip_reasm_timeout")), ), snmpTcpActiveOpens: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_active_opens")), ), snmpTcpAttemptFails: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_attempt_fails")), ), snmpTcpCurrEstab: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_curr_estab")), ), snmpTcpEstabResets: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_estab_resets")), ), snmpTcpInCsumErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_in_csum_errors")), ), snmpTcpInErrs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_in_errs")), ), snmpTcpInSegs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_in_segs")), ), snmpTcpMaxConn: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_max_conn")), ), snmpTcpOutRsts: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_out_rsts")), ), snmpTcpOutSegs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_out_segs")), ), snmpTcpPassiveOpens: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_passive_opens")), ), snmpTcpRetransSegs: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_retrans_segs")), ), snmpTcpRtoMax: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_rto_max")), ), snmpTcpRtoMin: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_tcp_rto_min")), ), snmpUdpInDatagrams: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_in_datagrams")), ), snmpUdpInErrors: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_in_errors")), ), snmpUdpNoPorts: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_no_ports")), ), snmpUdpOutDatagrams: S.optional( S.NullOr(S.Number).pipe(T.Body("snmp_udp_out_datagrams")), ), systemBootTimeS: S.optional( S.NullOr(S.Number).pipe(T.Body("system_boot_time_s")), ), thermals: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemThermalsList), ), tunnels: S.optional( S.NullOr(ConnectorsSnapshotsLatestListResponseItemsItemTunnelsList), ), uptimeIdleMs: S.optional( S.NullOr(S.Number).pipe(T.Body("uptime_idle_ms")), ), uptimeTotalMs: S.optional( S.NullOr(S.Number).pipe(T.Body("uptime_total_ms")), ), }), ).annotate({ identifier: "ConnectorsSnapshotsLatestListResponseItemsItem", }) as any as S.Schema; export type ConnectorsSnapshotsLatestListResponseItemsList = Array; export const ConnectorsSnapshotsLatestListResponseItemsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsLatestListResponseItemsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListConnectorSnapshotLatestsResponse { count: number; items: ConnectorsSnapshotsLatestListResponseItemsList; } export const ListConnectorSnapshotLatestsResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ count: S.Number, items: ConnectorsSnapshotsLatestListResponseItemsList, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorSnapshotLatestsResponse", }) as any as S.Schema; export interface ListConnectorSnapshotsRequest { /** Account identifier */ accountId: string; connectorId: string; from: number; to: number; cursor?: string; limit?: number; } export const ListConnectorSnapshotsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), from: S.Number.pipe(T.Query()), to: S.Number.pipe(T.Query()), cursor: S.optional(S.String.pipe(T.Query())), limit: S.optional(S.Number.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/snapshots", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorSnapshotsRequest", }) as any as S.Schema; export interface ConnectorsSnapshotsListResponseItemsItem { /** Time the Snapshot was collected (seconds since the Unix epoch) */ a: number; /** Time the Snapshot was recorded (seconds since the Unix epoch) */ t: number; } export const ConnectorsSnapshotsListResponseItemsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ a: S.Number, t: S.Number, }), ).annotate({ identifier: "ConnectorsSnapshotsListResponseItemsItem", }) as any as S.Schema; export type ConnectorsSnapshotsListResponseItemsList = Array; export const ConnectorsSnapshotsListResponseItemsList = /*@__PURE__*/ S.Array( ConnectorsSnapshotsListResponseItemsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListConnectorSnapshotsResponse { count: number; items: ConnectorsSnapshotsListResponseItemsList; cursor?: string | null; } export const ListConnectorSnapshotsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ count: S.Number, items: ConnectorsSnapshotsListResponseItemsList, cursor: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConnectorSnapshotsResponse", }) as any as S.Schema; export interface ListGreTunnelsRequest { /** Identifier */ accountId: string; xMagicNewHcTarget?: boolean; } export const ListGreTunnelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/gre_tunnels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListGreTunnelsRequest", }) as any as S.Schema; export type GreTunnelsListResponseGreTunnelsItemBgpExtraPrefixesList = Array; export const GreTunnelsListResponseGreTunnelsItemBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsListResponseGreTunnelsItemBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsListResponseGreTunnelsItemBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const GreTunnelsListResponseGreTunnelsItemBgp = /*@__PURE__*/ S.suspend( () => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemBgpExtraPrefixesList).pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsListResponseGreTunnelsItemBgp", }) as any as S.Schema; export type GreTunnelsListResponseGreTunnelsItemBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const GreTunnelsListResponseGreTunnelsItemBgpStatusState = /*@__PURE__*/ S.String; export interface GreTunnelsListResponseGreTunnelsItemBgpStatus { state: GreTunnelsListResponseGreTunnelsItemBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const GreTunnelsListResponseGreTunnelsItemBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: GreTunnelsListResponseGreTunnelsItemBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "GreTunnelsListResponseGreTunnelsItemBgpStatus", }) as any as S.Schema; export type GreTunnelsListResponseGreTunnelsItemHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsListResponseGreTunnelsItemHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsListResponseGreTunnelsItemHealthCheckRate = | "low" | "mid" | "high"; export const GreTunnelsListResponseGreTunnelsItemHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsListResponseGreTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsListResponseGreTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsListResponseGreTunnelsItemHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsListResponseGreTunnelsItemHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsListResponseGreTunnelsItemHealthCheckType = | "reply" | "request"; export const GreTunnelsListResponseGreTunnelsItemHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsListResponseGreTunnelsItemHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsListResponseGreTunnelsItemHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsListResponseGreTunnelsItemHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsListResponseGreTunnelsItemHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsListResponseGreTunnelsItemHealthCheckType | null; } export const GreTunnelsListResponseGreTunnelsItemHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemHealthCheckRate), ), target: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemHealthCheckTarget), ), type: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemHealthCheckType), ), }), ).annotate({ identifier: "GreTunnelsListResponseGreTunnelsItemHealthCheck", }) as any as S.Schema; export interface GreTunnelsListResponseGreTunnelsItem { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: GreTunnelsListResponseGreTunnelsItemBgp | null; bgpStatus?: GreTunnelsListResponseGreTunnelsItemBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the GRE tunnel. */ description?: string | null; healthCheck?: GreTunnelsListResponseGreTunnelsItemHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number | null; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number | null; } export const GreTunnelsListResponseGreTunnelsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(GreTunnelsListResponseGreTunnelsItemBgp)), bgpStatus: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsItemHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "GreTunnelsListResponseGreTunnelsItem", }) as any as S.Schema; export type GreTunnelsListResponseGreTunnelsList = Array; export const GreTunnelsListResponseGreTunnelsList = /*@__PURE__*/ S.Array( GreTunnelsListResponseGreTunnelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListGreTunnelsResponse { greTunnels?: GreTunnelsListResponseGreTunnelsList | null; } export const ListGreTunnelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ greTunnels: S.optional( S.NullOr(GreTunnelsListResponseGreTunnelsList).pipe( T.Body("gre_tunnels"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListGreTunnelsResponse", }) as any as S.Schema; export interface ListIpsecTunnelsRequest { /** Identifier */ accountId: string; xMagicNewHcTarget?: boolean; } export const ListIpsecTunnelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/ipsec_tunnels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListIpsecTunnelsRequest", }) as any as S.Schema; export type IpsecTunnelsListResponseIpsecTunnelsItemBgpExtraPrefixesList = Array; export const IpsecTunnelsListResponseIpsecTunnelsItemBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsListResponseIpsecTunnelsItemBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsListResponseIpsecTunnelsItemBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const IpsecTunnelsListResponseIpsecTunnelsItemBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( IpsecTunnelsListResponseIpsecTunnelsItemBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsListResponseIpsecTunnelsItemBgp", }) as any as S.Schema; export type IpsecTunnelsListResponseIpsecTunnelsItemBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const IpsecTunnelsListResponseIpsecTunnelsItemBgpStatusState = /*@__PURE__*/ S.String; export interface IpsecTunnelsListResponseIpsecTunnelsItemBgpStatus { state: IpsecTunnelsListResponseIpsecTunnelsItemBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const IpsecTunnelsListResponseIpsecTunnelsItemBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: IpsecTunnelsListResponseIpsecTunnelsItemBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "IpsecTunnelsListResponseIpsecTunnelsItemBgpStatus", }) as any as S.Schema; export type IpsecTunnelsListResponseIpsecTunnelsItemCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export const IpsecTunnelsListResponseIpsecTunnelsItemCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export type IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckRate = | "low" | "mid" | "high"; export const IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckType = | "reply" | "request"; export const IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsListResponseIpsecTunnelsItemHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckType | null; } export const IpsecTunnelsListResponseIpsecTunnelsItemHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckRate), ), target: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckTarget), ), type: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemHealthCheckType), ), }), ).annotate({ identifier: "IpsecTunnelsListResponseIpsecTunnelsItemHealthCheck", }) as any as S.Schema; export type IpsecTunnelsListResponseIpsecTunnelsItemPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsListResponseIpsecTunnelsItemPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export interface IpsecTunnelsListResponseIpsecTunnelsItem { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel (Phase 2). */ allowNullCipher?: boolean | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: IpsecTunnelsListResponseIpsecTunnelsItemBgp | null; bgpStatus?: IpsecTunnelsListResponseIpsecTunnelsItemBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; customRemoteIdentities?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities | null; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string | null; /** An optional description forthe IPsec tunnel. */ description?: string | null; healthCheck?: IpsecTunnelsListResponseIpsecTunnelsItemHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean | null; } export const IpsecTunnelsListResponseIpsecTunnelsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, allowNullCipher: S.optional( S.NullOr(S.Boolean).pipe(T.Body("allow_null_cipher")), ), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemBgp)), bgpStatus: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), customRemoteIdentities: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities, ).pipe(T.Body("custom_remote_identities")), ), customerEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("customer_endpoint")), ), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsItemHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), replayProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("replay_protection")), ), }), ).annotate({ identifier: "IpsecTunnelsListResponseIpsecTunnelsItem", }) as any as S.Schema; export type IpsecTunnelsListResponseIpsecTunnelsList = Array; export const IpsecTunnelsListResponseIpsecTunnelsList = /*@__PURE__*/ S.Array( IpsecTunnelsListResponseIpsecTunnelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListIpsecTunnelsResponse { ipsecTunnels?: IpsecTunnelsListResponseIpsecTunnelsList | null; } export const ListIpsecTunnelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ ipsecTunnels: S.optional( S.NullOr(IpsecTunnelsListResponseIpsecTunnelsList).pipe( T.Body("ipsec_tunnels"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListIpsecTunnelsResponse", }) as any as S.Schema; export interface ListPcapsRequest { /** Identifier. */ accountId: string; } export const ListPcapsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/pcaps", code: 200 }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPcapsRequest", }) as any as S.Schema; export type PcapsListResultItemPCAPFilterV1 = PcapsCreateResultPCAPFilterV1; export const PcapsListResultItemPCAPFilterV1 = PcapsCreateResultPCAPFilterV1; export type PcapsListResultItemPCAPStatus = | "unknown" | "success" | "pending" | "running" | "conversion_pending" | "conversion_running" | "complete" | "failed"; export const PcapsListResultItemPCAPStatus = /*@__PURE__*/ S.String; export type PcapsListResultItemPCAPSystem = "magic-transit"; export const PcapsListResultItemPCAPSystem = /*@__PURE__*/ S.String; export type PcapsListResultItemPCAPType = "simple" | "full"; export const PcapsListResultItemPCAPType = /*@__PURE__*/ S.String; export interface PcapsListResultItemPCAP { /** The ID for the packet capture. */ id?: string | null; /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateResultPCAPFilterV1 | null; /** The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request. */ offsetTime?: string | null; /** The status of the packet capture request. */ status?: PcapsListResultItemPCAPStatus | null; /** The RFC 3339 timestamp when the packet capture was created. */ submitted?: string | null; /** The system used to collect packet captures. */ system?: PcapsListResultItemPCAPSystem | null; /** The packet capture duration in seconds. */ timeLimit?: number | null; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type?: PcapsListResultItemPCAPType | null; } export const PcapsListResultItemPCAP = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), filterV1: S.optional( S.NullOr(PcapsCreateResultPCAPFilterV1).pipe(T.Body("filter_v1")), ), offsetTime: S.optional(S.NullOr(S.String).pipe(T.Body("offset_time"))), status: S.optional(S.NullOr(PcapsListResultItemPCAPStatus)), submitted: S.optional(S.NullOr(S.String)), system: S.optional(S.NullOr(PcapsListResultItemPCAPSystem)), timeLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("time_limit"))), type: S.optional(S.NullOr(PcapsListResultItemPCAPType)), }), ).annotate({ identifier: "PcapsListResultItemPCAP", }) as any as S.Schema; export type PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullStatus = | "unknown" | "success" | "pending" | "running" | "conversion_pending" | "conversion_running" | "complete" | "failed"; export const PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullStatus = /*@__PURE__*/ S.String; export type PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullSystem = "magic-transit"; export const PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullSystem = /*@__PURE__*/ S.String; export type PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullType = | "simple" | "full"; export const PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullType = /*@__PURE__*/ S.String; export interface PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFull { /** The ID for the packet capture. */ id?: string | null; /** The maximum number of bytes to capture. This field only applies to `full` packet captures. */ byteLimit?: number | null; /** The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to `full` packet captures. */ coloName?: string | null; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf?: string | null; /** An error message that describes why the packet capture failed. This field only applies to `full` packet captures. */ errorMessage?: string | null; /** The packet capture filter. When this field is empty, all packets are captured. */ filterV1?: PcapsCreateResultPCAPFilterV1 | null; /** The number of packets captured. */ packetsCaptured?: number | null; /** The status of the packet capture request. */ status?: PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullStatus | null; /** The RFC 3339 timestamp when stopping the packet capture was requested. This field only applies to `full` packet captures. */ stopRequested?: string | null; /** The RFC 3339 timestamp when the packet capture was created. */ submitted?: string | null; /** The system used to collect packet captures. */ system?: PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullSystem | null; /** The packet capture duration in seconds. */ timeLimit?: number | null; /** The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets. */ type?: PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullType | null; } export const PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFull = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), byteLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("byte_limit"))), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), destinationConf: S.optional( S.NullOr(S.String).pipe(T.Body("destination_conf")), ), errorMessage: S.optional( S.NullOr(S.String).pipe(T.Body("error_message")), ), filterV1: S.optional( S.NullOr(PcapsCreateResultPCAPFilterV1).pipe(T.Body("filter_v1")), ), packetsCaptured: S.optional( S.NullOr(S.Number).pipe(T.Body("packets_captured")), ), status: S.optional( S.NullOr( PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullStatus, ), ), stopRequested: S.optional( S.NullOr(S.String).pipe(T.Body("stop_requested")), ), submitted: S.optional(S.NullOr(S.String)), system: S.optional( S.NullOr( PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullSystem, ), ), timeLimit: S.optional(S.NullOr(S.Number).pipe(T.Body("time_limit"))), type: S.optional( S.NullOr(PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFullType), ), }), ).annotate({ identifier: "PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFull", }) as any as S.Schema; export type PcapsListResultItem = | PcapsListResultItemPCAP | PcapsListResultItemMagicVisibilityPCAPsPCAPsResponseFull; export const PcapsListResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "filterV1", "offsetTime", "status", "submitted", "system", "timeLimit", "type", ], [ "id", "byteLimit", "coloName", "destinationConf", "errorMessage", "filterV1", "packetsCaptured", "status", "stopRequested", "submitted", "system", "timeLimit", "type", ], ]), ); export type PcapsListResultList = Array; export const PcapsListResultList = /*@__PURE__*/ S.Array( PcapsListResultItem, ) as any as S.Schema; export interface ListPcapsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PcapsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPcapsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PcapsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPcapsResponse", }) as any as S.Schema; export interface ListRoutesRequest { /** Identifier */ accountId: string; } export const ListRoutesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/routes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRoutesRequest", }) as any as S.Schema; export type RoutesListResponseRoutesItemScopeColoNamesList = Array; export const RoutesListResponseRoutesItemScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesListResponseRoutesItemScopeColoRegionsList = Array; export const RoutesListResponseRoutesItemScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesListResponseRoutesItemScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesListResponseRoutesItemScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesListResponseRoutesItemScopeColoRegionsList | null; } export const RoutesListResponseRoutesItemScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( S.NullOr(RoutesListResponseRoutesItemScopeColoNamesList).pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( S.NullOr(RoutesListResponseRoutesItemScopeColoRegionsList).pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesListResponseRoutesItemScope", }) as any as S.Schema; export interface RoutesListResponseRoutesItem { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesListResponseRoutesItemScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const RoutesListResponseRoutesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional(S.NullOr(RoutesListResponseRoutesItemScope)), weight: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RoutesListResponseRoutesItem", }) as any as S.Schema; export type RoutesListResponseRoutesList = Array; export const RoutesListResponseRoutesList = /*@__PURE__*/ S.Array( RoutesListResponseRoutesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListRoutesResponse { routes?: RoutesListResponseRoutesList | null; } export const ListRoutesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ routes: S.optional(S.NullOr(RoutesListResponseRoutesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRoutesResponse", }) as any as S.Schema; export interface ListSiteAclsRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; } export const ListSiteAclsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/acls", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSiteAclsRequest", }) as any as S.Schema; export type SitesAclsListResultItemLan1PortRangesList = Array; export const SitesAclsListResultItemLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsListResultItemLan1PortsList = Array; export const SitesAclsListResultItemLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsListResultItemLan1SubnetsList = Array; export const SitesAclsListResultItemLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsListResultItemLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string | null; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsListResultItemLan1PortRangesList | null; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsListResultItemLan1PortsList | null; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsListResultItemLan1SubnetsList | null; } export const SitesAclsListResultItemLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.NullOr(S.String).pipe(T.Body("lan_name"))), portRanges: S.optional( S.NullOr(SitesAclsListResultItemLan1PortRangesList).pipe( T.Body("port_ranges"), ), ), ports: S.optional(S.NullOr(SitesAclsListResultItemLan1PortsList)), subnets: S.optional(S.NullOr(SitesAclsListResultItemLan1SubnetsList)), }), ).annotate({ identifier: "SitesAclsListResultItemLan1", }) as any as S.Schema; export type SitesAclsListResultItemProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsListResultItemProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsListResultItemProtocolsList = Array; export const SitesAclsListResultItemProtocolsList = /*@__PURE__*/ S.Array( SitesAclsListResultItemProtocolsItem, ) as any as S.Schema; export interface SitesAclsListResultItem { /** Identifier */ id?: string | null; /** Description for the ACL. */ description?: string | null; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean | null; lan_1?: SitesAclsListResultItemLan1 | null; lan_2?: SitesAclsListResultItemLan1 | null; /** The name of the ACL. */ name?: string | null; protocols?: SitesAclsListResultItemProtocolsList | null; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean | null; } export const SitesAclsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), forwardLocally: S.optional( S.NullOr(S.Boolean).pipe(T.Body("forward_locally")), ), lan_1: S.optional(S.NullOr(SitesAclsListResultItemLan1)), lan_2: S.optional(S.NullOr(SitesAclsListResultItemLan1)), name: S.optional(S.NullOr(S.String)), protocols: S.optional(S.NullOr(SitesAclsListResultItemProtocolsList)), unidirectional: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "SitesAclsListResultItem", }) as any as S.Schema; export type SitesAclsListResultList = Array; export const SitesAclsListResultList = /*@__PURE__*/ S.Array( SitesAclsListResultItem, ) as any as S.Schema; export interface ListSiteAclsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SitesAclsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSiteAclsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SitesAclsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSiteAclsResponse", }) as any as S.Schema; export interface ListSiteLansRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; } export const ListSiteLansRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/lans", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSiteLansRequest", }) as any as S.Schema; export type SitesLansListResultItemNat = SitesLansCreateResultItemNat; export const SitesLansListResultItemNat = SitesLansCreateResultItemNat; export type SitesLansListResultItemRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export const SitesLansListResultItemRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export type SitesLansListResultItemRoutedSubnetsList = Array; export const SitesLansListResultItemRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansListResultItemStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansListResultItemStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansListResultItemStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansListResultItemStaticAddressingDhcpRelayServerAddressesList | null; } export const SitesLansListResultItemStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( S.NullOr( SitesLansListResultItemStaticAddressingDhcpRelayServerAddressesList, ).pipe(T.Body("server_addresses")), ), }), ).annotate({ identifier: "SitesLansListResultItemStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItemType; /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansListResultItemStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansListResultItemStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansListResultItemStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansListResultItemStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansListResultItemStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsList | null; /** A valid IPv4 address. */ dhcpPoolEnd?: string | null; /** A valid IPv4 address. */ dhcpPoolStart?: string | null; /** A valid IPv4 address. */ dnsServer?: string | null; dnsServers?: SitesLansListResultItemStaticAddressingDhcpServerDnsServersList | null; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansListResultItemStaticAddressingDhcpServerReservationsMap | null; } export const SitesLansListResultItemStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( S.NullOr( SitesLansListResultItemStaticAddressingDhcpServerDhcpOptionsList, ).pipe(T.Body("dhcp_options")), ), dhcpPoolEnd: S.optional(S.NullOr(S.String).pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional( S.NullOr(S.String).pipe(T.Body("dhcp_pool_start")), ), dnsServer: S.optional(S.NullOr(S.String).pipe(T.Body("dns_server"))), dnsServers: S.optional( S.NullOr( SitesLansListResultItemStaticAddressingDhcpServerDnsServersList, ).pipe(T.Body("dns_servers")), ), reservations: S.optional( S.NullOr( SitesLansListResultItemStaticAddressingDhcpServerReservationsMap, ), ), }), ).annotate({ identifier: "SitesLansListResultItemStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansListResultItemStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansListResultItemStaticAddressingDhcpRelay | null; dhcpServer?: SitesLansListResultItemStaticAddressingDhcpServer | null; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string | null; } export const SitesLansListResultItemStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( S.NullOr(SitesLansListResultItemStaticAddressingDhcpRelay).pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( S.NullOr(SitesLansListResultItemStaticAddressingDhcpServer).pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), virtualAddress: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_address")), ), }), ).annotate({ identifier: "SitesLansListResultItemStaticAddressing", }) as any as S.Schema; export interface SitesLansListResultItem { /** Identifier */ id?: string | null; bondId?: number | null; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean | null; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean | null; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean | null; name?: string | null; nat?: SitesLansCreateResultItemNat | null; physport?: number | null; routedSubnets?: SitesLansListResultItemRoutedSubnetsList | null; /** Identifier */ siteId?: string | null; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansListResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const SitesLansListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), bondId: S.optional(S.NullOr(S.Number).pipe(T.Body("bond_id"))), haLink: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_link"))), isBreakout: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_breakout"))), isPrioritized: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_prioritized")), ), name: S.optional(S.NullOr(S.String)), nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), physport: S.optional(S.NullOr(S.Number)), routedSubnets: S.optional( S.NullOr(SitesLansListResultItemRoutedSubnetsList).pipe( T.Body("routed_subnets"), ), ), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesLansListResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }), ).annotate({ identifier: "SitesLansListResultItem", }) as any as S.Schema; export type SitesLansListResultList = Array; export const SitesLansListResultList = /*@__PURE__*/ S.Array( SitesLansListResultItem, ) as any as S.Schema; export interface ListSiteLansResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SitesLansListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSiteLansResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SitesLansListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSiteLansResponse", }) as any as S.Schema; export interface ListSitesRequest { /** Identifier */ accountId: string; /** Identifier */ connectorid?: string; } export const ListSitesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorid: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSitesRequest", }) as any as S.Schema; export type SitesListResultItemLocation = SitesCreateResponseLocation; export const SitesListResultItemLocation = SitesCreateResponseLocation; export interface SitesListResultItem { /** Identifier */ id?: string | null; /** Magic Connector identifier tag. */ connectorId?: string | null; description?: string | null; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean | null; /** Location of site in latitude and longitude. */ location?: SitesCreateResponseLocation | null; /** The name of the site. */ name?: string | null; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string | null; } export const SitesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), connectorId: S.optional(S.NullOr(S.String).pipe(T.Body("connector_id"))), description: S.optional(S.NullOr(S.String)), haMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_mode"))), location: S.optional(S.NullOr(SitesCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), secondaryConnectorId: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_connector_id")), ), }), ).annotate({ identifier: "SitesListResultItem", }) as any as S.Schema; export type SitesListResultList = Array; export const SitesListResultList = /*@__PURE__*/ S.Array( SitesListResultItem, ) as any as S.Schema; export interface ListSitesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SitesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSitesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SitesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSitesResponse", }) as any as S.Schema; export interface ListSitesAppConfigurationRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; } export const ListSitesAppConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/app_configs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSitesAppConfigurationRequest", }) as any as S.Schema; export type ListSitesAppConfigurationResultItemAccountAppPreferredWansList = Array; export const ListSitesAppConfigurationResultItemAccountAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ListSitesAppConfigurationResultItemAccountApp { /** Magic account app ID. */ accountAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: ListSitesAppConfigurationResultItemAccountAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const ListSitesAppConfigurationResultItemAccountApp = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( ListSitesAppConfigurationResultItemAccountAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "ListSitesAppConfigurationResultItemAccountApp", }) as any as S.Schema; export type ListSitesAppConfigurationResultItemManagedAppPreferredWansList = Array; export const ListSitesAppConfigurationResultItemManagedAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ListSitesAppConfigurationResultItemManagedApp { /** Managed app ID. */ managedAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: ListSitesAppConfigurationResultItemManagedAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const ListSitesAppConfigurationResultItemManagedApp = /*@__PURE__*/ S.suspend(() => S.Struct({ managedAppId: S.String.pipe(T.Body("managed_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( ListSitesAppConfigurationResultItemManagedAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "ListSitesAppConfigurationResultItemManagedApp", }) as any as S.Schema; export type ListSitesAppConfigurationResultItem = | ListSitesAppConfigurationResultItemAccountApp | ListSitesAppConfigurationResultItemManagedApp; export const ListSitesAppConfigurationResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accountAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ["managedAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ]), ); export type ListSitesAppConfigurationResultList = Array; export const ListSitesAppConfigurationResultList = /*@__PURE__*/ S.Array( ListSitesAppConfigurationResultItem, ) as any as S.Schema; export type ListSitesAppConfigurationResponse = ListSitesAppConfigurationResultList; export const ListSitesAppConfigurationResponse = /*@__PURE__*/ S.suspend(() => ListSitesAppConfigurationResultList.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "ListSitesAppConfigurationResponse", }) as any as S.Schema; export interface ListSiteWansRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; } export const ListSiteWansRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/magic/sites/{site_id}/wans", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSiteWansRequest", }) as any as S.Schema; export type SitesWansListResultItemHealthCheckRate = "low" | "mid" | "high"; export const SitesWansListResultItemHealthCheckRate = /*@__PURE__*/ S.String; export type SitesWansListResultItemStaticAddressing = SitesWansCreateResultItemStaticAddressing; export const SitesWansListResultItemStaticAddressing = SitesWansCreateResultItemStaticAddressing; export interface SitesWansListResultItem { /** Identifier */ id?: string | null; /** Magic WAN health check rate for tunnels created on this link. The default value is `mid`. */ healthCheckRate?: SitesWansListResultItemHealthCheckRate | null; name?: string | null; physport?: number | null; /** Priority of WAN for traffic loadbalancing. */ priority?: number | null; /** Identifier */ siteId?: string | null; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const SitesWansListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), healthCheckRate: S.optional( S.NullOr(SitesWansListResultItemHealthCheckRate).pipe( T.Body("health_check_rate"), ), ), name: S.optional(S.NullOr(S.String)), physport: S.optional(S.NullOr(S.Number)), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesWansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }), ).annotate({ identifier: "SitesWansListResultItem", }) as any as S.Schema; export type SitesWansListResultList = Array; export const SitesWansListResultList = /*@__PURE__*/ S.Array( SitesWansListResultItem, ) as any as S.Schema; export interface ListSiteWansResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SitesWansListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSiteWansResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SitesWansListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSiteWansResponse", }) as any as S.Schema; export type AppsEditRequestHostnamesList = Array; export const AppsEditRequestHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsEditRequestIpSubnetsList = Array; export const AppsEditRequestIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsEditRequestSourceSubnetsList = Array; export const AppsEditRequestSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PatchAppRequest { /** Identifier */ accountId: string; /** Identifier */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsEditRequestHostnamesList; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsEditRequestIpSubnetsList; /** Display name for the app. */ name?: string; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsEditRequestSourceSubnetsList; /** Category of the app. */ type?: string; } export const PatchAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), accountAppId: S.String.pipe(T.Label("account_app_id")), hostnames: S.optional(AppsEditRequestHostnamesList), ipSubnets: S.optional( AppsEditRequestIpSubnetsList.pipe(T.Body("ip_subnets")), ), name: S.optional(S.String), sourceSubnets: S.optional( AppsEditRequestSourceSubnetsList.pipe(T.Body("source_subnets")), ), type: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/apps/{account_app_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAppRequest", }) as any as S.Schema; export type AppsEditResponseHostnamesList = Array; export const AppsEditResponseHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsEditResponseIpSubnetsList = Array; export const AppsEditResponseIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsEditResponseSourceSubnetsList = Array; export const AppsEditResponseSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAppResponse { /** Magic account app ID. */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsEditResponseHostnamesList | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsEditResponseIpSubnetsList | null; /** Display name for the app. */ name?: string | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsEditResponseSourceSubnetsList | null; /** Category of the app. */ type?: string | null; } export const PatchAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), hostnames: S.optional(S.NullOr(AppsEditResponseHostnamesList)), ipSubnets: S.optional( S.NullOr(AppsEditResponseIpSubnetsList).pipe(T.Body("ip_subnets")), ), name: S.optional(S.NullOr(S.String)), sourceSubnets: S.optional( S.NullOr(AppsEditResponseSourceSubnetsList).pipe( T.Body("source_subnets"), ), ), type: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAppResponse", }) as any as S.Schema; export type Cf1SitesUpdateRequestLocation = Cf1SitesCreateRequestBodyItemLocation; export const Cf1SitesUpdateRequestLocation = Cf1SitesCreateRequestBodyItemLocation; export interface PatchCf1SiteRequest { /** Identifier */ accountId: string; /** Identifier */ cf1SiteId: string; /** A human-provided description of the CF1 Site. */ description?: string; location?: Cf1SitesCreateRequestBodyItemLocation; /** A human-provided name describing the CF1 Site that should be unique within the account. */ name?: string; } export const PatchCf1SiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cf1SiteId: S.String.pipe(T.Label("cf1_site_id")), description: S.optional(S.String), location: S.optional(Cf1SitesCreateRequestBodyItemLocation), name: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/cf1_sites/{cf1_site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCf1SiteRequest", }) as any as S.Schema; export type Cf1SitesUpdateResponseLocation = Cf1SitesCreateResultItemLocation; export const Cf1SitesUpdateResponseLocation = Cf1SitesCreateResultItemLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchCf1SiteResponse { /** A human-provided name describing the CF1 Site that should be unique within the account. */ name: string; /** Identifier */ id?: string | null; createdOn?: string | null; /** A human-provided description of the CF1 Site. */ description?: string | null; location?: Cf1SitesCreateResultItemLocation | null; modifiedOn?: string | null; } export const PatchCf1SiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), location: S.optional(S.NullOr(Cf1SitesCreateResultItemLocation)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCf1SiteResponse", }) as any as S.Schema; export type ConnectorsEditRequestInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsEditRequestInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsEditRequestInterruptWindowDaysOfWeekList = Array< ConnectorsEditRequestInterruptWindowDaysOfWeekItem | (string & {}) >; export const ConnectorsEditRequestInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsEditRequestInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsEditRequestInterruptWindowEmbargoDatesList = Array; export const ConnectorsEditRequestInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PatchConnectorRequest { /** Account identifier */ accountId: string; connectorId: string; activated?: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek?: ConnectorsEditRequestInterruptWindowDaysOfWeekList; interruptWindowDurationHours?: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates?: ConnectorsEditRequestInterruptWindowEmbargoDatesList; interruptWindowHourOfDay?: number; notes?: string; primary?: boolean; /** When true, regenerate license key for the connector. */ provisionLicense?: boolean; siteId?: string; timezone?: string; } export const PatchConnectorRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), activated: S.optional(S.Boolean), interruptWindowDaysOfWeek: S.optional( ConnectorsEditRequestInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), ), interruptWindowDurationHours: S.optional( S.Number.pipe(T.Body("interrupt_window_duration_hours")), ), interruptWindowEmbargoDates: S.optional( ConnectorsEditRequestInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), ), interruptWindowHourOfDay: S.optional( S.Number.pipe(T.Body("interrupt_window_hour_of_day")), ), notes: S.optional(S.String), primary: S.optional(S.Boolean), provisionLicense: S.optional(S.Boolean.pipe(T.Body("provision_license"))), siteId: S.optional(S.String.pipe(T.Body("site_id"))), timezone: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/connectors/{connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchConnectorRequest", }) as any as S.Schema; export type ConnectorsEditResponseInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsEditResponseInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsEditResponseInterruptWindowDaysOfWeekList = Array; export const ConnectorsEditResponseInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsEditResponseInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsEditResponseInterruptWindowEmbargoDatesList = Array; export const ConnectorsEditResponseInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConnectorsEditResponseDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsEditResponseDeviceType = /*@__PURE__*/ S.String; export interface ConnectorsEditResponseDevice { id: string; serialNumber?: string | null; type?: ConnectorsEditResponseDeviceType | null; } export const ConnectorsEditResponseDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), type: S.optional(S.NullOr(ConnectorsEditResponseDeviceType)), }), ).annotate({ identifier: "ConnectorsEditResponseDevice", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchConnectorResponse { id: string; activated: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek: ConnectorsEditResponseInterruptWindowDaysOfWeekList; interruptWindowDurationHours: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates: ConnectorsEditResponseInterruptWindowEmbargoDatesList; interruptWindowHourOfDay: number; lastUpdated: string; notes: string; primary: boolean; timezone: string; device?: ConnectorsEditResponseDevice | null; lastHeartbeat?: string | null; lastSeenVersion?: string | null; licenseKey?: string | null; siteId?: string | null; } export const PatchConnectorResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, activated: S.Boolean, interruptWindowDaysOfWeek: ConnectorsEditResponseInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), interruptWindowDurationHours: S.Number.pipe( T.Body("interrupt_window_duration_hours"), ), interruptWindowEmbargoDates: ConnectorsEditResponseInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), interruptWindowHourOfDay: S.Number.pipe( T.Body("interrupt_window_hour_of_day"), ), lastUpdated: S.String.pipe(T.Body("last_updated")), notes: S.String, primary: S.Boolean, timezone: S.String, device: S.optional(S.NullOr(ConnectorsEditResponseDevice)), lastHeartbeat: S.optional( S.NullOr(S.String).pipe(T.Body("last_heartbeat")), ), lastSeenVersion: S.optional( S.NullOr(S.String).pipe(T.Body("last_seen_version")), ), licenseKey: S.optional(S.NullOr(S.String).pipe(T.Body("license_key"))), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchConnectorResponse", }) as any as S.Schema; export type SitesEditRequestLocation = SitesCreateRequestLocation; export const SitesEditRequestLocation = SitesCreateRequestLocation; export interface PatchSiteRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Magic Connector identifier tag. */ connectorId?: string; description?: string; /** Location of site in latitude and longitude. */ location?: SitesCreateRequestLocation; /** The name of the site. */ name?: string; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string; } export const PatchSiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), connectorId: S.optional(S.String.pipe(T.Body("connector_id"))), description: S.optional(S.String), location: S.optional(SitesCreateRequestLocation), name: S.optional(S.String), secondaryConnectorId: S.optional( S.String.pipe(T.Body("secondary_connector_id")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/sites/{site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteRequest", }) as any as S.Schema; export type SitesEditResponseLocation = SitesCreateResponseLocation; export const SitesEditResponseLocation = SitesCreateResponseLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSiteResponse { /** Identifier */ id?: string | null; /** Magic Connector identifier tag. */ connectorId?: string | null; description?: string | null; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean | null; /** Location of site in latitude and longitude. */ location?: SitesCreateResponseLocation | null; /** The name of the site. */ name?: string | null; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string | null; } export const PatchSiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), connectorId: S.optional(S.NullOr(S.String).pipe(T.Body("connector_id"))), description: S.optional(S.NullOr(S.String)), haMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_mode"))), location: S.optional(S.NullOr(SitesCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), secondaryConnectorId: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_connector_id")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteResponse", }) as any as S.Schema; export type SitesAclsEditRequestLan1PortRangesList = Array; export const SitesAclsEditRequestLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsEditRequestLan1PortsList = Array; export const SitesAclsEditRequestLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsEditRequestLan1SubnetsList = Array; export const SitesAclsEditRequestLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsEditRequestLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsEditRequestLan1PortRangesList; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsEditRequestLan1PortsList; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsEditRequestLan1SubnetsList; } export const SitesAclsEditRequestLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.String.pipe(T.Body("lan_name"))), portRanges: S.optional( SitesAclsEditRequestLan1PortRangesList.pipe(T.Body("port_ranges")), ), ports: S.optional(SitesAclsEditRequestLan1PortsList), subnets: S.optional(SitesAclsEditRequestLan1SubnetsList), }), ).annotate({ identifier: "SitesAclsEditRequestLan1", }) as any as S.Schema; export type SitesAclsEditRequestProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsEditRequestProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsEditRequestProtocolsList = Array< SitesAclsEditRequestProtocolsItem | (string & {}) >; export const SitesAclsEditRequestProtocolsList = /*@__PURE__*/ S.Array( SitesAclsEditRequestProtocolsItem, ) as any as S.Schema; export interface PatchSiteAclRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ aclId: string; /** Description for the ACL. */ description?: string; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean; lan_1?: SitesAclsEditRequestLan1; lan_2?: SitesAclsEditRequestLan1; /** The name of the ACL. */ name?: string; protocols?: SitesAclsEditRequestProtocolsList; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean; } export const PatchSiteAclRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), aclId: S.String.pipe(T.Label("acl_id")), description: S.optional(S.String), forwardLocally: S.optional(S.Boolean.pipe(T.Body("forward_locally"))), lan_1: S.optional(SitesAclsEditRequestLan1), lan_2: S.optional(SitesAclsEditRequestLan1), name: S.optional(S.String), protocols: S.optional(SitesAclsEditRequestProtocolsList), unidirectional: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteAclRequest", }) as any as S.Schema; export type SitesAclsEditResponseLan1PortRangesList = Array; export const SitesAclsEditResponseLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsEditResponseLan1PortsList = Array; export const SitesAclsEditResponseLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsEditResponseLan1SubnetsList = Array; export const SitesAclsEditResponseLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsEditResponseLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string | null; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsEditResponseLan1PortRangesList | null; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsEditResponseLan1PortsList | null; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsEditResponseLan1SubnetsList | null; } export const SitesAclsEditResponseLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.NullOr(S.String).pipe(T.Body("lan_name"))), portRanges: S.optional( S.NullOr(SitesAclsEditResponseLan1PortRangesList).pipe( T.Body("port_ranges"), ), ), ports: S.optional(S.NullOr(SitesAclsEditResponseLan1PortsList)), subnets: S.optional(S.NullOr(SitesAclsEditResponseLan1SubnetsList)), }), ).annotate({ identifier: "SitesAclsEditResponseLan1", }) as any as S.Schema; export type SitesAclsEditResponseProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsEditResponseProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsEditResponseProtocolsList = Array; export const SitesAclsEditResponseProtocolsList = /*@__PURE__*/ S.Array( SitesAclsEditResponseProtocolsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSiteAclResponse { /** Identifier */ id?: string | null; /** Description for the ACL. */ description?: string | null; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean | null; lan_1?: SitesAclsEditResponseLan1 | null; lan_2?: SitesAclsEditResponseLan1 | null; /** The name of the ACL. */ name?: string | null; protocols?: SitesAclsEditResponseProtocolsList | null; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean | null; } export const PatchSiteAclResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), forwardLocally: S.optional( S.NullOr(S.Boolean).pipe(T.Body("forward_locally")), ), lan_1: S.optional(S.NullOr(SitesAclsEditResponseLan1)), lan_2: S.optional(S.NullOr(SitesAclsEditResponseLan1)), name: S.optional(S.NullOr(S.String)), protocols: S.optional(S.NullOr(SitesAclsEditResponseProtocolsList)), unidirectional: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteAclResponse", }) as any as S.Schema; export type SitesLansEditRequestNat = SitesLansCreateRequestNat; export const SitesLansEditRequestNat = SitesLansCreateRequestNat; export type SitesLansEditRequestRoutedSubnetsItem = SitesLansCreateRequestRoutedSubnetsItem; export const SitesLansEditRequestRoutedSubnetsItem = SitesLansCreateRequestRoutedSubnetsItem; export type SitesLansEditRequestRoutedSubnetsList = Array; export const SitesLansEditRequestRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateRequestRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansEditRequestStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansEditRequestStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansEditRequestStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansEditRequestStaticAddressingDhcpRelayServerAddressesList; } export const SitesLansEditRequestStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( SitesLansEditRequestStaticAddressingDhcpRelayServerAddressesList.pipe( T.Body("server_addresses"), ), ), }), ).annotate({ identifier: "SitesLansEditRequestStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: | SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItemType | (string & {}); /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansEditRequestStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansEditRequestStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansEditRequestStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansEditRequestStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansEditRequestStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsList; /** A valid IPv4 address. */ dhcpPoolEnd?: string; /** A valid IPv4 address. */ dhcpPoolStart?: string; /** A valid IPv4 address. */ dnsServer?: string; dnsServers?: SitesLansEditRequestStaticAddressingDhcpServerDnsServersList; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansEditRequestStaticAddressingDhcpServerReservationsMap; } export const SitesLansEditRequestStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( SitesLansEditRequestStaticAddressingDhcpServerDhcpOptionsList.pipe( T.Body("dhcp_options"), ), ), dhcpPoolEnd: S.optional(S.String.pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional(S.String.pipe(T.Body("dhcp_pool_start"))), dnsServer: S.optional(S.String.pipe(T.Body("dns_server"))), dnsServers: S.optional( SitesLansEditRequestStaticAddressingDhcpServerDnsServersList.pipe( T.Body("dns_servers"), ), ), reservations: S.optional( SitesLansEditRequestStaticAddressingDhcpServerReservationsMap, ), }), ).annotate({ identifier: "SitesLansEditRequestStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansEditRequestStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansEditRequestStaticAddressingDhcpRelay; dhcpServer?: SitesLansEditRequestStaticAddressingDhcpServer; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string; } export const SitesLansEditRequestStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( SitesLansEditRequestStaticAddressingDhcpRelay.pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( SitesLansEditRequestStaticAddressingDhcpServer.pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional(S.String.pipe(T.Body("secondary_address"))), virtualAddress: S.optional(S.String.pipe(T.Body("virtual_address"))), }), ).annotate({ identifier: "SitesLansEditRequestStaticAddressing", }) as any as S.Schema; export interface PatchSiteLanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ lanId: string; bondId?: number; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean; name?: string; nat?: SitesLansCreateRequestNat; physport?: number; routedSubnets?: SitesLansEditRequestRoutedSubnetsList; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansEditRequestStaticAddressing; /** VLAN ID. Use zero for untagged. */ vlanTag?: number; } export const PatchSiteLanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), lanId: S.String.pipe(T.Label("lan_id")), bondId: S.optional(S.Number.pipe(T.Body("bond_id"))), isBreakout: S.optional(S.Boolean.pipe(T.Body("is_breakout"))), isPrioritized: S.optional(S.Boolean.pipe(T.Body("is_prioritized"))), name: S.optional(S.String), nat: S.optional(SitesLansCreateRequestNat), physport: S.optional(S.Number), routedSubnets: S.optional( SitesLansEditRequestRoutedSubnetsList.pipe(T.Body("routed_subnets")), ), staticAddressing: S.optional( SitesLansEditRequestStaticAddressing.pipe(T.Body("static_addressing")), ), vlanTag: S.optional(S.Number.pipe(T.Body("vlan_tag"))), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteLanRequest", }) as any as S.Schema; export type SitesLansEditResponseNat = SitesLansCreateResultItemNat; export const SitesLansEditResponseNat = SitesLansCreateResultItemNat; export type SitesLansEditResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export const SitesLansEditResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export type SitesLansEditResponseRoutedSubnetsList = Array; export const SitesLansEditResponseRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansEditResponseStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansEditResponseStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansEditResponseStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansEditResponseStaticAddressingDhcpRelayServerAddressesList | null; } export const SitesLansEditResponseStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( S.NullOr( SitesLansEditResponseStaticAddressingDhcpRelayServerAddressesList, ).pipe(T.Body("server_addresses")), ), }), ).annotate({ identifier: "SitesLansEditResponseStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItemType; /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansEditResponseStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansEditResponseStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansEditResponseStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansEditResponseStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansEditResponseStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsList | null; /** A valid IPv4 address. */ dhcpPoolEnd?: string | null; /** A valid IPv4 address. */ dhcpPoolStart?: string | null; /** A valid IPv4 address. */ dnsServer?: string | null; dnsServers?: SitesLansEditResponseStaticAddressingDhcpServerDnsServersList | null; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansEditResponseStaticAddressingDhcpServerReservationsMap | null; } export const SitesLansEditResponseStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( S.NullOr( SitesLansEditResponseStaticAddressingDhcpServerDhcpOptionsList, ).pipe(T.Body("dhcp_options")), ), dhcpPoolEnd: S.optional(S.NullOr(S.String).pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional( S.NullOr(S.String).pipe(T.Body("dhcp_pool_start")), ), dnsServer: S.optional(S.NullOr(S.String).pipe(T.Body("dns_server"))), dnsServers: S.optional( S.NullOr( SitesLansEditResponseStaticAddressingDhcpServerDnsServersList, ).pipe(T.Body("dns_servers")), ), reservations: S.optional( S.NullOr( SitesLansEditResponseStaticAddressingDhcpServerReservationsMap, ), ), }), ).annotate({ identifier: "SitesLansEditResponseStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansEditResponseStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansEditResponseStaticAddressingDhcpRelay | null; dhcpServer?: SitesLansEditResponseStaticAddressingDhcpServer | null; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string | null; } export const SitesLansEditResponseStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( S.NullOr(SitesLansEditResponseStaticAddressingDhcpRelay).pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( S.NullOr(SitesLansEditResponseStaticAddressingDhcpServer).pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), virtualAddress: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_address")), ), }), ).annotate({ identifier: "SitesLansEditResponseStaticAddressing", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSiteLanResponse { /** Identifier */ id?: string | null; bondId?: number | null; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean | null; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean | null; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean | null; name?: string | null; nat?: SitesLansCreateResultItemNat | null; physport?: number | null; routedSubnets?: SitesLansEditResponseRoutedSubnetsList | null; /** Identifier */ siteId?: string | null; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansEditResponseStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const PatchSiteLanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), bondId: S.optional(S.NullOr(S.Number).pipe(T.Body("bond_id"))), haLink: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_link"))), isBreakout: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_breakout"))), isPrioritized: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_prioritized")), ), name: S.optional(S.NullOr(S.String)), nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), physport: S.optional(S.NullOr(S.Number)), routedSubnets: S.optional( S.NullOr(SitesLansEditResponseRoutedSubnetsList).pipe( T.Body("routed_subnets"), ), ), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesLansEditResponseStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteLanResponse", }) as any as S.Schema; export type SitesWansEditRequestStaticAddressing = SitesWansCreateRequestStaticAddressing; export const SitesWansEditRequestStaticAddressing = SitesWansCreateRequestStaticAddressing; export interface PatchSiteWanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ wanId: string; name?: string; physport?: number; priority?: number; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateRequestStaticAddressing; /** VLAN ID. Use zero for untagged. */ vlanTag?: number; } export const PatchSiteWanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), wanId: S.String.pipe(T.Label("wan_id")), name: S.optional(S.String), physport: S.optional(S.Number), priority: S.optional(S.Number), staticAddressing: S.optional( SitesWansCreateRequestStaticAddressing.pipe(T.Body("static_addressing")), ), vlanTag: S.optional(S.Number.pipe(T.Body("vlan_tag"))), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteWanRequest", }) as any as S.Schema; export type SitesWansEditResponseHealthCheckRate = "low" | "mid" | "high"; export const SitesWansEditResponseHealthCheckRate = /*@__PURE__*/ S.String; export type SitesWansEditResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; export const SitesWansEditResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSiteWanResponse { /** Identifier */ id?: string | null; /** Magic WAN health check rate for tunnels created on this link. The default value is `mid`. */ healthCheckRate?: SitesWansEditResponseHealthCheckRate | null; name?: string | null; physport?: number | null; /** Priority of WAN for traffic loadbalancing. */ priority?: number | null; /** Identifier */ siteId?: string | null; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const PatchSiteWanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), healthCheckRate: S.optional( S.NullOr(SitesWansEditResponseHealthCheckRate).pipe( T.Body("health_check_rate"), ), ), name: S.optional(S.NullOr(S.String)), physport: S.optional(S.NullOr(S.Number)), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesWansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSiteWanResponse", }) as any as S.Schema; export interface PskGenerateIpsecTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ ipsecTunnelId: string; } export const PskGenerateIpsecTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ipsecTunnelId: S.String.pipe(T.Label("ipsec_tunnel_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}/psk_generate", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PskGenerateIpsecTunnelRequest", }) as any as S.Schema; export type IpsecTunnelsPskGenerateResponsePskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsPskGenerateResponsePskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PskGenerateIpsecTunnelResponse { /** Identifier */ ipsecTunnelId?: string | null; /** A randomly generated or provided string for use in the IPsec tunnel. */ psk?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; } export const PskGenerateIpsecTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ ipsecTunnelId: S.optional( S.NullOr(S.String).pipe(T.Body("ipsec_tunnel_id")), ), psk: S.optional(S.NullOr(S.String)), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PskGenerateIpsecTunnelResponse", }) as any as S.Schema; export interface IpsecTunnelsPskSetRequestPsksItem { /** The ID of the IPsec tunnel. */ id: string; /** A randomly generated or provided string for use in the IPsec tunnel. */ psk: string; } export const IpsecTunnelsPskSetRequestPsksItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, psk: S.String, }), ).annotate({ identifier: "IpsecTunnelsPskSetRequestPsksItem", }) as any as S.Schema; export type IpsecTunnelsPskSetRequestPsksList = Array; export const IpsecTunnelsPskSetRequestPsksList = /*@__PURE__*/ S.Array( IpsecTunnelsPskSetRequestPsksItem, ) as any as S.Schema; export interface PskSetIpsecTunnelRequest { /** Identifier */ accountId: string; /** If `true`, only run validation without persisting changes. */ validateOnly?: boolean; /** List of tunnel ID and PSK pairs. */ psks: IpsecTunnelsPskSetRequestPsksList; } export const PskSetIpsecTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), validateOnly: S.optional(S.Boolean.pipe(T.Query("validate_only"))), psks: IpsecTunnelsPskSetRequestPsksList, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/magic/ipsec_tunnels/psk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PskSetIpsecTunnelRequest", }) as any as S.Schema; export type IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValuePskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValuePskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export interface IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValue { /** The IKE identifier used for this tunnel on the Cloudflare edge. */ ipsecId: string; /** Identifier */ ipsecTunnelId: string; /** A randomly generated or provided string for use in the IPsec tunnel. */ psk: string; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; } export const IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValue = /*@__PURE__*/ S.suspend(() => S.Struct({ ipsecId: S.String.pipe(T.Body("ipsec_id")), ipsecTunnelId: S.String.pipe(T.Body("ipsec_tunnel_id")), psk: S.String, pskMetadata: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata.pipe( T.Body("psk_metadata"), ), }), ).annotate({ identifier: "IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValue", }) as any as S.Schema; export type IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksMap = { [key: string]: | IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValue | undefined; }; export const IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksMap = /*@__PURE__*/ S.Record( S.String, IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksValue, ) as any as S.Schema; export type IpsecTunnelsPskSetResponseUnappliedPsksMap = { [key: string]: string | undefined; }; export const IpsecTunnelsPskSetResponseUnappliedPsksMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PskSetIpsecTunnelResponse { /** Map of tunnel IDs to successfully applied PSK details. */ successfullyAppliedPsks?: IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksMap | null; /** Map of tunnel IDs to failure reasons for PSKs that could not be applied. */ unappliedPsks?: IpsecTunnelsPskSetResponseUnappliedPsksMap | null; } export const PskSetIpsecTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ successfullyAppliedPsks: S.optional( S.NullOr(IpsecTunnelsPskSetResponseSuccessfullyAppliedPsksMap).pipe( T.Body("successfully_applied_psks"), ), ), unappliedPsks: S.optional( S.NullOr(IpsecTunnelsPskSetResponseUnappliedPsksMap).pipe( T.Body("unapplied_psks"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PskSetIpsecTunnelResponse", }) as any as S.Schema; export interface CfInterconnectsUpdateRequestGre { /** The IP address assigned to the Cloudflare side of the GRE tunnel created as part of the Interconnect. */ cloudflareEndpoint?: string; } export const CfInterconnectsUpdateRequestGre = /*@__PURE__*/ S.suspend(() => S.Struct({ cloudflareEndpoint: S.optional( S.String.pipe(T.Body("cloudflare_endpoint")), ), }), ).annotate({ identifier: "CfInterconnectsUpdateRequestGre", }) as any as S.Schema; export type CfInterconnectsUpdateRequestHealthCheckRate = | "low" | "mid" | "high"; export const CfInterconnectsUpdateRequestHealthCheckRate = /*@__PURE__*/ S.String; export type CfInterconnectsUpdateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsUpdateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export type CfInterconnectsUpdateRequestHealthCheckTarget = | string | GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsUpdateRequestHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type CfInterconnectsUpdateRequestHealthCheckType = "reply" | "request"; export const CfInterconnectsUpdateRequestHealthCheckType = /*@__PURE__*/ S.String; export interface CfInterconnectsUpdateRequestHealthCheck { /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean; /** How frequent the health check is run. The default value is `mid`. */ rate?: CfInterconnectsUpdateRequestHealthCheckRate | (string & {}); /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: CfInterconnectsUpdateRequestHealthCheckTarget; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: CfInterconnectsUpdateRequestHealthCheckType | (string & {}); } export const CfInterconnectsUpdateRequestHealthCheck = /*@__PURE__*/ S.suspend( () => S.Struct({ enabled: S.optional(S.Boolean), rate: S.optional(CfInterconnectsUpdateRequestHealthCheckRate), target: S.optional(CfInterconnectsUpdateRequestHealthCheckTarget), type: S.optional(CfInterconnectsUpdateRequestHealthCheckType), }), ).annotate({ identifier: "CfInterconnectsUpdateRequestHealthCheck", }) as any as S.Schema; export interface PutCfInterconnectRequest { /** Identifier */ accountId: string; /** Identifier */ cfInterconnectId: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean; /** An optional description of the interconnect. */ description?: string; /** The configuration specific to GRE interconnects. */ gre?: CfInterconnectsUpdateRequestGre; healthCheck?: CfInterconnectsUpdateRequestHealthCheck; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress?: string; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string; /** The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576. */ mtu?: number; /** The name of the interconnect. The name cannot share a name with other tunnels. */ name?: string; xMagicNewHcTarget?: boolean; } export const PutCfInterconnectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), cfInterconnectId: S.String.pipe(T.Label("cf_interconnect_id")), automaticReturnRouting: S.optional( S.Boolean.pipe(T.Body("automatic_return_routing")), ), description: S.optional(S.String), gre: S.optional(CfInterconnectsUpdateRequestGre), healthCheck: S.optional( CfInterconnectsUpdateRequestHealthCheck.pipe(T.Body("health_check")), ), interfaceAddress: S.optional(S.String.pipe(T.Body("interface_address"))), interfaceAddress6: S.optional(S.String.pipe(T.Body("interface_address6"))), mtu: S.optional(S.Number), name: S.optional(S.String), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/cf_interconnects/{cf_interconnect_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutCfInterconnectRequest", }) as any as S.Schema; export type CfInterconnectsUpdateResponseModifiedInterconnectGre = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre; export const CfInterconnectsUpdateResponseModifiedInterconnectGre = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre; export type CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckRate = | "low" | "mid" | "high"; export const CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckRate = /*@__PURE__*/ S.String; export type CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckType = | "reply" | "request"; export const CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckType = /*@__PURE__*/ S.String; export interface CfInterconnectsUpdateResponseModifiedInterconnectHealthCheck { /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckType | null; } export const CfInterconnectsUpdateResponseModifiedInterconnectHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr( CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckRate, ), ), target: S.optional( S.NullOr( CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckTarget, ), ), type: S.optional( S.NullOr( CfInterconnectsUpdateResponseModifiedInterconnectHealthCheckType, ), ), }), ).annotate({ identifier: "CfInterconnectsUpdateResponseModifiedInterconnectHealthCheck", }) as any as S.Schema; export interface CfInterconnectsUpdateResponseModifiedInterconnect { /** Identifier */ id?: string | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ coloName?: string | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the interconnect. */ description?: string | null; /** The configuration specific to GRE interconnects. */ gre?: CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre | null; healthCheck?: CfInterconnectsUpdateResponseModifiedInterconnectHealthCheck | null; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress?: string | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576. */ mtu?: number | null; /** The name of the interconnect. The name cannot share a name with other tunnels. */ name?: string | null; /** An identifier that correlates this interconnect with the corresponding V2 CNI interconnect resource. */ virtualPortReservationId?: string | null; } export const CfInterconnectsUpdateResponseModifiedInterconnect = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), coloName: S.optional(S.NullOr(S.String).pipe(T.Body("colo_name"))), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), gre: S.optional( S.NullOr(CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemGre), ), healthCheck: S.optional( S.NullOr( CfInterconnectsUpdateResponseModifiedInterconnectHealthCheck, ).pipe(T.Body("health_check")), ), interfaceAddress: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address")), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), virtualPortReservationId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_port_reservation_id")), ), }), ).annotate({ identifier: "CfInterconnectsUpdateResponseModifiedInterconnect", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutCfInterconnectResponse { modified?: boolean | null; modifiedInterconnect?: CfInterconnectsUpdateResponseModifiedInterconnect | null; } export const PutCfInterconnectResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedInterconnect: S.optional( S.NullOr(CfInterconnectsUpdateResponseModifiedInterconnect).pipe( T.Body("modified_interconnect"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutCfInterconnectResponse", }) as any as S.Schema; export interface StopPcapRequest { /** Identifier. */ accountId: string; /** Identifier. */ pcapId: string; } export const StopPcapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), pcapId: S.String.pipe(T.Label("pcap_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/pcaps/{pcap_id}/stop", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "StopPcapRequest", }) as any as S.Schema; export interface StopPcapResponse {} export const StopPcapResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "StopPcapResponse", }) as any as S.Schema; export type AppsUpdateRequestHostnamesList = Array; export const AppsUpdateRequestHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateRequestIpSubnetsList = Array; export const AppsUpdateRequestIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateRequestSourceSubnetsList = Array; export const AppsUpdateRequestSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateAppRequest { /** Identifier */ accountId: string; /** Identifier */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsUpdateRequestHostnamesList; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsUpdateRequestIpSubnetsList; /** Display name for the app. */ name?: string; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsUpdateRequestSourceSubnetsList; /** Category of the app. */ type?: string; } export const UpdateAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), accountAppId: S.String.pipe(T.Label("account_app_id")), hostnames: S.optional(AppsUpdateRequestHostnamesList), ipSubnets: S.optional( AppsUpdateRequestIpSubnetsList.pipe(T.Body("ip_subnets")), ), name: S.optional(S.String), sourceSubnets: S.optional( AppsUpdateRequestSourceSubnetsList.pipe(T.Body("source_subnets")), ), type: S.optional(S.String), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/apps/{account_app_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateAppRequest", }) as any as S.Schema; export type AppsUpdateResponseHostnamesList = Array; export const AppsUpdateResponseHostnamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateResponseIpSubnetsList = Array; export const AppsUpdateResponseIpSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateResponseSourceSubnetsList = Array; export const AppsUpdateResponseSourceSubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateAppResponse { /** Magic account app ID. */ accountAppId: string; /** FQDNs to associate with traffic decisions. */ hostnames?: AppsUpdateResponseHostnamesList | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ ipSubnets?: AppsUpdateResponseIpSubnetsList | null; /** Display name for the app. */ name?: string | null; /** IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported) */ sourceSubnets?: AppsUpdateResponseSourceSubnetsList | null; /** Category of the app. */ type?: string | null; } export const UpdateAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), hostnames: S.optional(S.NullOr(AppsUpdateResponseHostnamesList)), ipSubnets: S.optional( S.NullOr(AppsUpdateResponseIpSubnetsList).pipe(T.Body("ip_subnets")), ), name: S.optional(S.NullOr(S.String)), sourceSubnets: S.optional( S.NullOr(AppsUpdateResponseSourceSubnetsList).pipe( T.Body("source_subnets"), ), ), type: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateAppResponse", }) as any as S.Schema; export type ConnectorsUpdateRequestInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsUpdateRequestInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsUpdateRequestInterruptWindowDaysOfWeekList = Array< ConnectorsUpdateRequestInterruptWindowDaysOfWeekItem | (string & {}) >; export const ConnectorsUpdateRequestInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsUpdateRequestInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsUpdateRequestInterruptWindowEmbargoDatesList = Array; export const ConnectorsUpdateRequestInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateConnectorRequest { /** Account identifier */ accountId: string; connectorId: string; activated?: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek?: ConnectorsUpdateRequestInterruptWindowDaysOfWeekList; interruptWindowDurationHours?: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates?: ConnectorsUpdateRequestInterruptWindowEmbargoDatesList; interruptWindowHourOfDay?: number; notes?: string; primary?: boolean; /** When true, regenerate license key for the connector. */ provisionLicense?: boolean; siteId?: string; timezone?: string; } export const UpdateConnectorRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), connectorId: S.String.pipe(T.Label("connector_id")), activated: S.optional(S.Boolean), interruptWindowDaysOfWeek: S.optional( ConnectorsUpdateRequestInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), ), interruptWindowDurationHours: S.optional( S.Number.pipe(T.Body("interrupt_window_duration_hours")), ), interruptWindowEmbargoDates: S.optional( ConnectorsUpdateRequestInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), ), interruptWindowHourOfDay: S.optional( S.Number.pipe(T.Body("interrupt_window_hour_of_day")), ), notes: S.optional(S.String), primary: S.optional(S.Boolean), provisionLicense: S.optional(S.Boolean.pipe(T.Body("provision_license"))), siteId: S.optional(S.String.pipe(T.Body("site_id"))), timezone: S.optional(S.String), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/connectors/{connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateConnectorRequest", }) as any as S.Schema; export type ConnectorsUpdateResponseInterruptWindowDaysOfWeekItem = | "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export const ConnectorsUpdateResponseInterruptWindowDaysOfWeekItem = /*@__PURE__*/ S.String; export type ConnectorsUpdateResponseInterruptWindowDaysOfWeekList = Array; export const ConnectorsUpdateResponseInterruptWindowDaysOfWeekList = /*@__PURE__*/ S.Array( ConnectorsUpdateResponseInterruptWindowDaysOfWeekItem, ) as any as S.Schema; export type ConnectorsUpdateResponseInterruptWindowEmbargoDatesList = Array; export const ConnectorsUpdateResponseInterruptWindowEmbargoDatesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConnectorsUpdateResponseDeviceType = "MANAGED" | "LICENSED"; export const ConnectorsUpdateResponseDeviceType = /*@__PURE__*/ S.String; export interface ConnectorsUpdateResponseDevice { id: string; serialNumber?: string | null; type?: ConnectorsUpdateResponseDeviceType | null; } export const ConnectorsUpdateResponseDevice = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), type: S.optional(S.NullOr(ConnectorsUpdateResponseDeviceType)), }), ).annotate({ identifier: "ConnectorsUpdateResponseDevice", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateConnectorResponse { id: string; activated: boolean; /** Allowed days of the week for upgrades. Default is all days. */ interruptWindowDaysOfWeek: ConnectorsUpdateResponseInterruptWindowDaysOfWeekList; interruptWindowDurationHours: number; /** List of dates (YYYY-MM-DD) when upgrades are blocked. */ interruptWindowEmbargoDates: ConnectorsUpdateResponseInterruptWindowEmbargoDatesList; interruptWindowHourOfDay: number; lastUpdated: string; notes: string; primary: boolean; timezone: string; device?: ConnectorsUpdateResponseDevice | null; lastHeartbeat?: string | null; lastSeenVersion?: string | null; licenseKey?: string | null; siteId?: string | null; } export const UpdateConnectorResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, activated: S.Boolean, interruptWindowDaysOfWeek: ConnectorsUpdateResponseInterruptWindowDaysOfWeekList.pipe( T.Body("interrupt_window_days_of_week"), ), interruptWindowDurationHours: S.Number.pipe( T.Body("interrupt_window_duration_hours"), ), interruptWindowEmbargoDates: ConnectorsUpdateResponseInterruptWindowEmbargoDatesList.pipe( T.Body("interrupt_window_embargo_dates"), ), interruptWindowHourOfDay: S.Number.pipe( T.Body("interrupt_window_hour_of_day"), ), lastUpdated: S.String.pipe(T.Body("last_updated")), notes: S.String, primary: S.Boolean, timezone: S.String, device: S.optional(S.NullOr(ConnectorsUpdateResponseDevice)), lastHeartbeat: S.optional( S.NullOr(S.String).pipe(T.Body("last_heartbeat")), ), lastSeenVersion: S.optional( S.NullOr(S.String).pipe(T.Body("last_seen_version")), ), licenseKey: S.optional(S.NullOr(S.String).pipe(T.Body("license_key"))), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateConnectorResponse", }) as any as S.Schema; export type GreTunnelsUpdateRequestHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsUpdateRequestHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsUpdateRequestHealthCheckRate = "low" | "mid" | "high"; export const GreTunnelsUpdateRequestHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsUpdateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsUpdateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsUpdateRequestHealthCheckTarget = | string | GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsUpdateRequestHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsUpdateRequestHealthCheckType = "reply" | "request"; export const GreTunnelsUpdateRequestHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsUpdateRequestHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsUpdateRequestHealthCheckDirection | (string & {}); /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsUpdateRequestHealthCheckRate | (string & {}); /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsUpdateRequestHealthCheckTarget; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsUpdateRequestHealthCheckType | (string & {}); } export const GreTunnelsUpdateRequestHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional(GreTunnelsUpdateRequestHealthCheckDirection), enabled: S.optional(S.Boolean), rate: S.optional(GreTunnelsUpdateRequestHealthCheckRate), target: S.optional(GreTunnelsUpdateRequestHealthCheckTarget), type: S.optional(GreTunnelsUpdateRequestHealthCheckType), }), ).annotate({ identifier: "GreTunnelsUpdateRequestHealthCheck", }) as any as S.Schema; export interface UpdateGreTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ greTunnelId: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean; /** An optional description of the GRE tunnel. */ description?: string; healthCheck?: GreTunnelsUpdateRequestHealthCheck; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number; xMagicNewHcTarget?: boolean; } export const UpdateGreTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), greTunnelId: S.String.pipe(T.Label("gre_tunnel_id")), cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.Boolean.pipe(T.Body("automatic_return_routing")), ), description: S.optional(S.String), healthCheck: S.optional( GreTunnelsUpdateRequestHealthCheck.pipe(T.Body("health_check")), ), interfaceAddress6: S.optional(S.String.pipe(T.Body("interface_address6"))), mtu: S.optional(S.Number), ttl: S.optional(S.Number), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/gre_tunnels/{gre_tunnel_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateGreTunnelRequest", }) as any as S.Schema; export type GreTunnelsUpdateResponseModifiedGreTunnelBgpExtraPrefixesList = Array; export const GreTunnelsUpdateResponseModifiedGreTunnelBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GreTunnelsUpdateResponseModifiedGreTunnelBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: GreTunnelsUpdateResponseModifiedGreTunnelBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const GreTunnelsUpdateResponseModifiedGreTunnelBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( GreTunnelsUpdateResponseModifiedGreTunnelBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "GreTunnelsUpdateResponseModifiedGreTunnelBgp", }) as any as S.Schema; export type GreTunnelsUpdateResponseModifiedGreTunnelBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const GreTunnelsUpdateResponseModifiedGreTunnelBgpStatusState = /*@__PURE__*/ S.String; export interface GreTunnelsUpdateResponseModifiedGreTunnelBgpStatus { state: GreTunnelsUpdateResponseModifiedGreTunnelBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const GreTunnelsUpdateResponseModifiedGreTunnelBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: GreTunnelsUpdateResponseModifiedGreTunnelBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "GreTunnelsUpdateResponseModifiedGreTunnelBgpStatus", }) as any as S.Schema; export type GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckDirection = | "unidirectional" | "bidirectional"; export const GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckDirection = /*@__PURE__*/ S.String; export type GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckRate = | "low" | "mid" | "high"; export const GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckRate = /*@__PURE__*/ S.String; export type GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckType = | "reply" | "request"; export const GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckType = /*@__PURE__*/ S.String; export interface GreTunnelsUpdateResponseModifiedGreTunnelHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckType | null; } export const GreTunnelsUpdateResponseModifiedGreTunnelHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckDirection), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckRate), ), target: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckTarget), ), type: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelHealthCheckType), ), }), ).annotate({ identifier: "GreTunnelsUpdateResponseModifiedGreTunnelHealthCheck", }) as any as S.Schema; export interface GreTunnelsUpdateResponseModifiedGreTunnel { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the GRE tunnel. */ cloudflareGreEndpoint: string; /** The IP address assigned to the customer side of the GRE tunnel. */ customerGreEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: GreTunnelsUpdateResponseModifiedGreTunnelBgp | null; bgpStatus?: GreTunnelsUpdateResponseModifiedGreTunnelBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; /** An optional description of the GRE tunnel. */ description?: string | null; healthCheck?: GreTunnelsUpdateResponseModifiedGreTunnelHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. */ mtu?: number | null; /** Time To Live (TTL) in number of hops of the GRE tunnel. */ ttl?: number | null; } export const GreTunnelsUpdateResponseModifiedGreTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareGreEndpoint: S.String.pipe(T.Body("cloudflare_gre_endpoint")), customerGreEndpoint: S.String.pipe(T.Body("customer_gre_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelBgp)), bgpStatus: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnelHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), mtu: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "GreTunnelsUpdateResponseModifiedGreTunnel", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateGreTunnelResponse { modified?: boolean | null; modifiedGreTunnel?: GreTunnelsUpdateResponseModifiedGreTunnel | null; } export const UpdateGreTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedGreTunnel: S.optional( S.NullOr(GreTunnelsUpdateResponseModifiedGreTunnel).pipe( T.Body("modified_gre_tunnel"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateGreTunnelResponse", }) as any as S.Schema; export type IpsecTunnelsUpdateRequestBgpExtraPrefixesList = Array; export const IpsecTunnelsUpdateRequestBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsUpdateRequestBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsUpdateRequestBgpExtraPrefixesList; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string; /** MD5 key to use for session authentication. */ md5Key?: string; } export const IpsecTunnelsUpdateRequestBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional(S.String.pipe(T.Body("export_filter_id"))), extraPrefixes: S.optional( IpsecTunnelsUpdateRequestBgpExtraPrefixesList.pipe( T.Body("extra_prefixes"), ), ), importFilterId: S.optional(S.String.pipe(T.Body("import_filter_id"))), md5Key: S.optional(S.String.pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsUpdateRequestBgp", }) as any as S.Schema; export type IpsecTunnelsUpdateRequestCustomRemoteIdentities = IpsecTunnelsCreateRequestCustomRemoteIdentities; export const IpsecTunnelsUpdateRequestCustomRemoteIdentities = IpsecTunnelsCreateRequestCustomRemoteIdentities; export type IpsecTunnelsUpdateRequestHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsUpdateRequestHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsUpdateRequestHealthCheckRate = "low" | "mid" | "high"; export const IpsecTunnelsUpdateRequestHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsUpdateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsUpdateRequestHealthCheckTargetMagicHealthCheckTarget = GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsUpdateRequestHealthCheckTarget = | string | GreTunnelsCreateRequestHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsUpdateRequestHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsUpdateRequestHealthCheckType = "reply" | "request"; export const IpsecTunnelsUpdateRequestHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsUpdateRequestHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsUpdateRequestHealthCheckDirection | (string & {}); /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsUpdateRequestHealthCheckRate | (string & {}); /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsUpdateRequestHealthCheckTarget; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsUpdateRequestHealthCheckType | (string & {}); } export const IpsecTunnelsUpdateRequestHealthCheck = /*@__PURE__*/ S.suspend( () => S.Struct({ direction: S.optional(IpsecTunnelsUpdateRequestHealthCheckDirection), enabled: S.optional(S.Boolean), rate: S.optional(IpsecTunnelsUpdateRequestHealthCheckRate), target: S.optional(IpsecTunnelsUpdateRequestHealthCheckTarget), type: S.optional(IpsecTunnelsUpdateRequestHealthCheckType), }), ).annotate({ identifier: "IpsecTunnelsUpdateRequestHealthCheck", }) as any as S.Schema; export interface UpdateIpsecTunnelRequest { /** Identifier */ accountId: string; /** Identifier */ ipsecTunnelId: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean; bgp?: IpsecTunnelsUpdateRequestBgp; customRemoteIdentities?: IpsecTunnelsCreateRequestCustomRemoteIdentities; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string; /** An optional description forthe IPsec tunnel. */ description?: string; healthCheck?: IpsecTunnelsUpdateRequestHealthCheck; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string; /** A randomly generated or provided string for use in the IPsec tunnel. */ psk?: string; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean; xMagicNewHcTarget?: boolean; } export const UpdateIpsecTunnelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ipsecTunnelId: S.String.pipe(T.Label("ipsec_tunnel_id")), cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, automaticReturnRouting: S.optional( S.Boolean.pipe(T.Body("automatic_return_routing")), ), bgp: S.optional(IpsecTunnelsUpdateRequestBgp), customRemoteIdentities: S.optional( IpsecTunnelsCreateRequestCustomRemoteIdentities.pipe( T.Body("custom_remote_identities"), ), ), customerEndpoint: S.optional(S.String.pipe(T.Body("customer_endpoint"))), description: S.optional(S.String), healthCheck: S.optional( IpsecTunnelsUpdateRequestHealthCheck.pipe(T.Body("health_check")), ), interfaceAddress6: S.optional(S.String.pipe(T.Body("interface_address6"))), psk: S.optional(S.String), replayProtection: S.optional(S.Boolean.pipe(T.Body("replay_protection"))), xMagicNewHcTarget: S.optional( S.Boolean.pipe(T.Header("x-magic-new-hc-target")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/ipsec_tunnels/{ipsec_tunnel_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateIpsecTunnelRequest", }) as any as S.Schema; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpExtraPrefixesList = Array; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpExtraPrefixesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgp { /** ASN used on the customer end of the BGP session */ customerAsn: number; /** ID of the BGP filter profile applied to routes advertised to the customer. */ exportFilterId?: string | null; /** Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table. */ extraPrefixes?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpExtraPrefixesList | null; /** ID of the BGP filter profile applied to routes received from the customer. */ importFilterId?: string | null; /** MD5 key to use for session authentication. */ md5Key?: string | null; } export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgp = /*@__PURE__*/ S.suspend(() => S.Struct({ customerAsn: S.Number.pipe(T.Body("customer_asn")), exportFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("export_filter_id")), ), extraPrefixes: S.optional( S.NullOr( IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpExtraPrefixesList, ).pipe(T.Body("extra_prefixes")), ), importFilterId: S.optional( S.NullOr(S.String).pipe(T.Body("import_filter_id")), ), md5Key: S.optional(S.NullOr(S.String).pipe(T.Body("md5_key"))), }), ).annotate({ identifier: "IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgp", }) as any as S.Schema; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatusState = | "BGP_DOWN" | "BGP_UP" | "BGP_ESTABLISHING"; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatusState = /*@__PURE__*/ S.String; export interface IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatus { state: IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatusState; tcpEstablished: boolean; updatedAt: string; bgpState?: string | null; cfSpeakerIp?: string | null; cfSpeakerPort?: number | null; customerSpeakerIp?: string | null; customerSpeakerPort?: number | null; } export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ state: IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatusState, tcpEstablished: S.Boolean.pipe(T.Body("tcp_established")), updatedAt: S.String.pipe(T.Body("updated_at")), bgpState: S.optional(S.NullOr(S.String).pipe(T.Body("bgp_state"))), cfSpeakerIp: S.optional(S.NullOr(S.String).pipe(T.Body("cf_speaker_ip"))), cfSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("cf_speaker_port")), ), customerSpeakerIp: S.optional( S.NullOr(S.String).pipe(T.Body("customer_speaker_ip")), ), customerSpeakerPort: S.optional( S.NullOr(S.Number).pipe(T.Body("customer_speaker_port")), ), }), ).annotate({ identifier: "IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatus", }) as any as S.Schema; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelCustomRemoteIdentities = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckDirection = | "unidirectional" | "bidirectional"; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckDirection = /*@__PURE__*/ S.String; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckRate = | "low" | "mid" | "high"; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckRate = /*@__PURE__*/ S.String; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckTargetMagicHealthCheckTarget = CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckTarget = | string | CfInterconnectsBulkUpdateResponseModifiedInterconnectsItemHealthCheckTargetMagicHealthCheckTarget; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckTarget = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], ["effective", "saved"]])); export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckType = | "reply" | "request"; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckType = /*@__PURE__*/ S.String; export interface IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheck { /** The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. */ direction?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckDirection | null; /** Determines whether to run healthchecks for a tunnel. */ enabled?: boolean | null; /** How frequent the health check is run. The default value is `mid`. */ rate?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckRate | null; /** The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false. */ target?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckTarget | null; /** The type of healthcheck to run, reply or request. The default value is `reply`. */ type?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckType | null; } export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheck = /*@__PURE__*/ S.suspend(() => S.Struct({ direction: S.optional( S.NullOr( IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckDirection, ), ), enabled: S.optional(S.NullOr(S.Boolean)), rate: S.optional( S.NullOr(IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckRate), ), target: S.optional( S.NullOr( IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckTarget, ), ), type: S.optional( S.NullOr(IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheckType), ), }), ).annotate({ identifier: "IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheck", }) as any as S.Schema; export type IpsecTunnelsUpdateResponseModifiedIpsecTunnelPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export const IpsecTunnelsUpdateResponseModifiedIpsecTunnelPskMetadata = IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata; export interface IpsecTunnelsUpdateResponseModifiedIpsecTunnel { /** Identifier */ id: string; /** The IP address assigned to the Cloudflare side of the IPsec tunnel. */ cloudflareEndpoint: string; /** A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. */ interfaceAddress: string; /** The name of the IPsec tunnel. The name cannot share a name with other tunnels. */ name: string; /** When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel (Phase 2). */ allowNullCipher?: boolean | null; /** True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. */ automaticReturnRouting?: boolean | null; bgp?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgp | null; bgpStatus?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatus | null; /** The date and time the tunnel was created. */ createdOn?: string | null; customRemoteIdentities?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities | null; /** The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. */ customerEndpoint?: string | null; /** An optional description forthe IPsec tunnel. */ description?: string | null; healthCheck?: IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheck | null; /** A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 */ interfaceAddress6?: string | null; /** The date and time the tunnel was last modified. */ modifiedOn?: string | null; /** The PSK metadata that includes when the PSK was generated. */ pskMetadata?: IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata | null; /** If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. */ replayProtection?: boolean | null; } export const IpsecTunnelsUpdateResponseModifiedIpsecTunnel = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, cloudflareEndpoint: S.String.pipe(T.Body("cloudflare_endpoint")), interfaceAddress: S.String.pipe(T.Body("interface_address")), name: S.String, allowNullCipher: S.optional( S.NullOr(S.Boolean).pipe(T.Body("allow_null_cipher")), ), automaticReturnRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("automatic_return_routing")), ), bgp: S.optional( S.NullOr(IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgp), ), bgpStatus: S.optional( S.NullOr(IpsecTunnelsUpdateResponseModifiedIpsecTunnelBgpStatus).pipe( T.Body("bgp_status"), ), ), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), customRemoteIdentities: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemCustomRemoteIdentities, ).pipe(T.Body("custom_remote_identities")), ), customerEndpoint: S.optional( S.NullOr(S.String).pipe(T.Body("customer_endpoint")), ), description: S.optional(S.NullOr(S.String)), healthCheck: S.optional( S.NullOr(IpsecTunnelsUpdateResponseModifiedIpsecTunnelHealthCheck).pipe( T.Body("health_check"), ), ), interfaceAddress6: S.optional( S.NullOr(S.String).pipe(T.Body("interface_address6")), ), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), pskMetadata: S.optional( S.NullOr( IpsecTunnelsBulkUpdateResponseModifiedIpsecTunnelsItemPskMetadata, ).pipe(T.Body("psk_metadata")), ), replayProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("replay_protection")), ), }), ).annotate({ identifier: "IpsecTunnelsUpdateResponseModifiedIpsecTunnel", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateIpsecTunnelResponse { modified?: boolean | null; modifiedIpsecTunnel?: IpsecTunnelsUpdateResponseModifiedIpsecTunnel | null; } export const UpdateIpsecTunnelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedIpsecTunnel: S.optional( S.NullOr(IpsecTunnelsUpdateResponseModifiedIpsecTunnel).pipe( T.Body("modified_ipsec_tunnel"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateIpsecTunnelResponse", }) as any as S.Schema; export type RoutesUpdateRequestScopeColoNamesList = Array; export const RoutesUpdateRequestScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesUpdateRequestScopeColoRegionsList = Array; export const RoutesUpdateRequestScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesUpdateRequestScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesUpdateRequestScopeColoNamesList; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesUpdateRequestScopeColoRegionsList; } export const RoutesUpdateRequestScope = /*@__PURE__*/ S.suspend(() => S.Struct({ coloNames: S.optional( RoutesUpdateRequestScopeColoNamesList.pipe(T.Body("colo_names")), ), coloRegions: S.optional( RoutesUpdateRequestScopeColoRegionsList.pipe(T.Body("colo_regions")), ), }), ).annotate({ identifier: "RoutesUpdateRequestScope", }) as any as S.Schema; export interface UpdateRouteRequest { /** Identifier */ accountId: string; /** Identifier */ routeId: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** An optional human provided description of the static route. */ description?: string; /** Used only for ECMP routes. */ scope?: RoutesUpdateRequestScope; /** Optional weight of the ECMP scope - if provided. */ weight?: number; } export const UpdateRouteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), routeId: S.String.pipe(T.Label("route_id")), nexthop: S.String, prefix: S.String, priority: S.Number, description: S.optional(S.String), scope: S.optional(RoutesUpdateRequestScope), weight: S.optional(S.Number), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/routes/{route_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateRouteRequest", }) as any as S.Schema; export type RoutesUpdateResponseModifiedRouteScopeColoNamesList = Array; export const RoutesUpdateResponseModifiedRouteScopeColoNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type RoutesUpdateResponseModifiedRouteScopeColoRegionsList = Array; export const RoutesUpdateResponseModifiedRouteScopeColoRegionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RoutesUpdateResponseModifiedRouteScope { /** List of colo names for the ECMP scope. */ coloNames?: RoutesUpdateResponseModifiedRouteScopeColoNamesList | null; /** List of colo regions for the ECMP scope. */ coloRegions?: RoutesUpdateResponseModifiedRouteScopeColoRegionsList | null; } export const RoutesUpdateResponseModifiedRouteScope = /*@__PURE__*/ S.suspend( () => S.Struct({ coloNames: S.optional( S.NullOr(RoutesUpdateResponseModifiedRouteScopeColoNamesList).pipe( T.Body("colo_names"), ), ), coloRegions: S.optional( S.NullOr(RoutesUpdateResponseModifiedRouteScopeColoRegionsList).pipe( T.Body("colo_regions"), ), ), }), ).annotate({ identifier: "RoutesUpdateResponseModifiedRouteScope", }) as any as S.Schema; export interface RoutesUpdateResponseModifiedRoute { /** Identifier */ id: string; /** The next-hop IP Address for the static route. */ nexthop: string; /** IP Prefix in Classless Inter-Domain Routing format. */ prefix: string; /** Priority of the static route. */ priority: number; /** When the route was created. */ createdOn?: string | null; /** An optional human provided description of the static route. */ description?: string | null; /** When the route was last modified. */ modifiedOn?: string | null; /** Used only for ECMP routes. */ scope?: RoutesUpdateResponseModifiedRouteScope | null; /** Optional weight of the ECMP scope - if provided. */ weight?: number | null; } export const RoutesUpdateResponseModifiedRoute = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, nexthop: S.String, prefix: S.String, priority: S.Number, createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), scope: S.optional(S.NullOr(RoutesUpdateResponseModifiedRouteScope)), weight: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "RoutesUpdateResponseModifiedRoute", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateRouteResponse { modified?: boolean | null; modifiedRoute?: RoutesUpdateResponseModifiedRoute | null; } export const UpdateRouteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.Boolean)), modifiedRoute: S.optional( S.NullOr(RoutesUpdateResponseModifiedRoute).pipe( T.Body("modified_route"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateRouteResponse", }) as any as S.Schema; export type SitesUpdateRequestLocation = SitesCreateRequestLocation; export const SitesUpdateRequestLocation = SitesCreateRequestLocation; export interface UpdateSiteRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Magic Connector identifier tag. */ connectorId?: string; description?: string; /** Location of site in latitude and longitude. */ location?: SitesCreateRequestLocation; /** The name of the site. */ name?: string; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string; } export const UpdateSiteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), connectorId: S.optional(S.String.pipe(T.Body("connector_id"))), description: S.optional(S.String), location: S.optional(SitesCreateRequestLocation), name: S.optional(S.String), secondaryConnectorId: S.optional( S.String.pipe(T.Body("secondary_connector_id")), ), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/sites/{site_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteRequest", }) as any as S.Schema; export type SitesUpdateResponseLocation = SitesCreateResponseLocation; export const SitesUpdateResponseLocation = SitesCreateResponseLocation; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateSiteResponse { /** Identifier */ id?: string | null; /** Magic Connector identifier tag. */ connectorId?: string | null; description?: string | null; /** Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. */ haMode?: boolean | null; /** Location of site in latitude and longitude. */ location?: SitesCreateResponseLocation | null; /** The name of the site. */ name?: string | null; /** Magic Connector identifier tag. Used when high availability mode is on. */ secondaryConnectorId?: string | null; } export const UpdateSiteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), connectorId: S.optional(S.NullOr(S.String).pipe(T.Body("connector_id"))), description: S.optional(S.NullOr(S.String)), haMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_mode"))), location: S.optional(S.NullOr(SitesCreateResponseLocation)), name: S.optional(S.NullOr(S.String)), secondaryConnectorId: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_connector_id")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteResponse", }) as any as S.Schema; export type SitesAclsUpdateRequestLan1PortRangesList = Array; export const SitesAclsUpdateRequestLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsUpdateRequestLan1PortsList = Array; export const SitesAclsUpdateRequestLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsUpdateRequestLan1SubnetsList = Array; export const SitesAclsUpdateRequestLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsUpdateRequestLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsUpdateRequestLan1PortRangesList; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsUpdateRequestLan1PortsList; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsUpdateRequestLan1SubnetsList; } export const SitesAclsUpdateRequestLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.String.pipe(T.Body("lan_name"))), portRanges: S.optional( SitesAclsUpdateRequestLan1PortRangesList.pipe(T.Body("port_ranges")), ), ports: S.optional(SitesAclsUpdateRequestLan1PortsList), subnets: S.optional(SitesAclsUpdateRequestLan1SubnetsList), }), ).annotate({ identifier: "SitesAclsUpdateRequestLan1", }) as any as S.Schema; export type SitesAclsUpdateRequestProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsUpdateRequestProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsUpdateRequestProtocolsList = Array< SitesAclsUpdateRequestProtocolsItem | (string & {}) >; export const SitesAclsUpdateRequestProtocolsList = /*@__PURE__*/ S.Array( SitesAclsUpdateRequestProtocolsItem, ) as any as S.Schema; export interface UpdateSiteAclRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ aclId: string; /** Description for the ACL. */ description?: string; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean; lan_1?: SitesAclsUpdateRequestLan1; lan_2?: SitesAclsUpdateRequestLan1; /** The name of the ACL. */ name?: string; protocols?: SitesAclsUpdateRequestProtocolsList; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean; } export const UpdateSiteAclRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), aclId: S.String.pipe(T.Label("acl_id")), description: S.optional(S.String), forwardLocally: S.optional(S.Boolean.pipe(T.Body("forward_locally"))), lan_1: S.optional(SitesAclsUpdateRequestLan1), lan_2: S.optional(SitesAclsUpdateRequestLan1), name: S.optional(S.String), protocols: S.optional(SitesAclsUpdateRequestProtocolsList), unidirectional: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteAclRequest", }) as any as S.Schema; export type SitesAclsUpdateResponseLan1PortRangesList = Array; export const SitesAclsUpdateResponseLan1PortRangesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesAclsUpdateResponseLan1PortsList = Array; export const SitesAclsUpdateResponseLan1PortsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type SitesAclsUpdateResponseLan1SubnetsList = Array; export const SitesAclsUpdateResponseLan1SubnetsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesAclsUpdateResponseLan1 { /** The identifier for the LAN you want to create an ACL policy with. */ lanId: string; /** The name of the LAN based on the provided lan_id. */ lanName?: string | null; /** Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed. */ portRanges?: SitesAclsUpdateResponseLan1PortRangesList | null; /** Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed. */ ports?: SitesAclsUpdateResponseLan1PortsList | null; /** Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed. */ subnets?: SitesAclsUpdateResponseLan1SubnetsList | null; } export const SitesAclsUpdateResponseLan1 = /*@__PURE__*/ S.suspend(() => S.Struct({ lanId: S.String.pipe(T.Body("lan_id")), lanName: S.optional(S.NullOr(S.String).pipe(T.Body("lan_name"))), portRanges: S.optional( S.NullOr(SitesAclsUpdateResponseLan1PortRangesList).pipe( T.Body("port_ranges"), ), ), ports: S.optional(S.NullOr(SitesAclsUpdateResponseLan1PortsList)), subnets: S.optional(S.NullOr(SitesAclsUpdateResponseLan1SubnetsList)), }), ).annotate({ identifier: "SitesAclsUpdateResponseLan1", }) as any as S.Schema; export type SitesAclsUpdateResponseProtocolsItem = "tcp" | "udp" | "icmp"; export const SitesAclsUpdateResponseProtocolsItem = /*@__PURE__*/ S.String; export type SitesAclsUpdateResponseProtocolsList = Array; export const SitesAclsUpdateResponseProtocolsList = /*@__PURE__*/ S.Array( SitesAclsUpdateResponseProtocolsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateSiteAclResponse { /** Identifier */ id?: string | null; /** Description for the ACL. */ description?: string | null; /** The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false. */ forwardLocally?: boolean | null; lan_1?: SitesAclsUpdateResponseLan1 | null; lan_2?: SitesAclsUpdateResponseLan1 | null; /** The name of the ACL. */ name?: string | null; protocols?: SitesAclsUpdateResponseProtocolsList | null; /** The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false. */ unidirectional?: boolean | null; } export const UpdateSiteAclResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), forwardLocally: S.optional( S.NullOr(S.Boolean).pipe(T.Body("forward_locally")), ), lan_1: S.optional(S.NullOr(SitesAclsUpdateResponseLan1)), lan_2: S.optional(S.NullOr(SitesAclsUpdateResponseLan1)), name: S.optional(S.NullOr(S.String)), protocols: S.optional(S.NullOr(SitesAclsUpdateResponseProtocolsList)), unidirectional: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteAclResponse", }) as any as S.Schema; export type SitesLansUpdateRequestNat = SitesLansCreateRequestNat; export const SitesLansUpdateRequestNat = SitesLansCreateRequestNat; export type SitesLansUpdateRequestRoutedSubnetsItem = SitesLansCreateRequestRoutedSubnetsItem; export const SitesLansUpdateRequestRoutedSubnetsItem = SitesLansCreateRequestRoutedSubnetsItem; export type SitesLansUpdateRequestRoutedSubnetsList = Array; export const SitesLansUpdateRequestRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateRequestRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansUpdateRequestStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansUpdateRequestStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansUpdateRequestStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansUpdateRequestStaticAddressingDhcpRelayServerAddressesList; } export const SitesLansUpdateRequestStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( SitesLansUpdateRequestStaticAddressingDhcpRelayServerAddressesList.pipe( T.Body("server_addresses"), ), ), }), ).annotate({ identifier: "SitesLansUpdateRequestStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: | SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItemType | (string & {}); /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansUpdateRequestStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansUpdateRequestStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansUpdateRequestStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansUpdateRequestStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansUpdateRequestStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsList; /** A valid IPv4 address. */ dhcpPoolEnd?: string; /** A valid IPv4 address. */ dhcpPoolStart?: string; /** A valid IPv4 address. */ dnsServer?: string; dnsServers?: SitesLansUpdateRequestStaticAddressingDhcpServerDnsServersList; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansUpdateRequestStaticAddressingDhcpServerReservationsMap; } export const SitesLansUpdateRequestStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( SitesLansUpdateRequestStaticAddressingDhcpServerDhcpOptionsList.pipe( T.Body("dhcp_options"), ), ), dhcpPoolEnd: S.optional(S.String.pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional(S.String.pipe(T.Body("dhcp_pool_start"))), dnsServer: S.optional(S.String.pipe(T.Body("dns_server"))), dnsServers: S.optional( SitesLansUpdateRequestStaticAddressingDhcpServerDnsServersList.pipe( T.Body("dns_servers"), ), ), reservations: S.optional( SitesLansUpdateRequestStaticAddressingDhcpServerReservationsMap, ), }), ).annotate({ identifier: "SitesLansUpdateRequestStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansUpdateRequestStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansUpdateRequestStaticAddressingDhcpRelay; dhcpServer?: SitesLansUpdateRequestStaticAddressingDhcpServer; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string; } export const SitesLansUpdateRequestStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( SitesLansUpdateRequestStaticAddressingDhcpRelay.pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( SitesLansUpdateRequestStaticAddressingDhcpServer.pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional(S.String.pipe(T.Body("secondary_address"))), virtualAddress: S.optional(S.String.pipe(T.Body("virtual_address"))), }), ).annotate({ identifier: "SitesLansUpdateRequestStaticAddressing", }) as any as S.Schema; export interface UpdateSiteLanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ lanId: string; bondId?: number; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean; name?: string; nat?: SitesLansCreateRequestNat; physport?: number; routedSubnets?: SitesLansUpdateRequestRoutedSubnetsList; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansUpdateRequestStaticAddressing; /** VLAN ID. Use zero for untagged. */ vlanTag?: number; } export const UpdateSiteLanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), lanId: S.String.pipe(T.Label("lan_id")), bondId: S.optional(S.Number.pipe(T.Body("bond_id"))), isBreakout: S.optional(S.Boolean.pipe(T.Body("is_breakout"))), isPrioritized: S.optional(S.Boolean.pipe(T.Body("is_prioritized"))), name: S.optional(S.String), nat: S.optional(SitesLansCreateRequestNat), physport: S.optional(S.Number), routedSubnets: S.optional( SitesLansUpdateRequestRoutedSubnetsList.pipe(T.Body("routed_subnets")), ), staticAddressing: S.optional( SitesLansUpdateRequestStaticAddressing.pipe(T.Body("static_addressing")), ), vlanTag: S.optional(S.Number.pipe(T.Body("vlan_tag"))), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteLanRequest", }) as any as S.Schema; export type SitesLansUpdateResponseNat = SitesLansCreateResultItemNat; export const SitesLansUpdateResponseNat = SitesLansCreateResultItemNat; export type SitesLansUpdateResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export const SitesLansUpdateResponseRoutedSubnetsItem = SitesLansCreateResultItemRoutedSubnetsItem; export type SitesLansUpdateResponseRoutedSubnetsList = Array; export const SitesLansUpdateResponseRoutedSubnetsList = /*@__PURE__*/ S.Array( SitesLansCreateResultItemRoutedSubnetsItem, ) as any as S.Schema; export type SitesLansUpdateResponseStaticAddressingDhcpRelayServerAddressesList = Array; export const SitesLansUpdateResponseStaticAddressingDhcpRelayServerAddressesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SitesLansUpdateResponseStaticAddressingDhcpRelay { /** List of DHCP server IPs. */ serverAddresses?: SitesLansUpdateResponseStaticAddressingDhcpRelayServerAddressesList | null; } export const SitesLansUpdateResponseStaticAddressingDhcpRelay = /*@__PURE__*/ S.suspend(() => S.Struct({ serverAddresses: S.optional( S.NullOr( SitesLansUpdateResponseStaticAddressingDhcpRelayServerAddressesList, ).pipe(T.Body("server_addresses")), ), }), ).annotate({ identifier: "SitesLansUpdateResponseStaticAddressingDhcpRelay", }) as any as S.Schema; export type SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItemType = | "text" | "hex" | "ip" | "byte" | "short" | "integer"; export const SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItemType = /*@__PURE__*/ S.String; export interface SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItem { /** DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration. */ code: number; /** The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes). */ type: SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItemType; /** The option value, interpreted according to the type field. */ value: string; } export const SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, type: SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItemType, value: S.String, }), ).annotate({ identifier: "SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItem", }) as any as S.Schema; export type SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsList = Array; export const SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsList = /*@__PURE__*/ S.Array( SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsItem, ) as any as S.Schema; export type SitesLansUpdateResponseStaticAddressingDhcpServerDnsServersList = Array; export const SitesLansUpdateResponseStaticAddressingDhcpServerDnsServersList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SitesLansUpdateResponseStaticAddressingDhcpServerReservationsMap = { [key: string]: unknown | undefined; }; export const SitesLansUpdateResponseStaticAddressingDhcpServerReservationsMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface SitesLansUpdateResponseStaticAddressingDhcpServer { /** Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. */ dhcpOptions?: SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsList | null; /** A valid IPv4 address. */ dhcpPoolEnd?: string | null; /** A valid IPv4 address. */ dhcpPoolStart?: string | null; /** A valid IPv4 address. */ dnsServer?: string | null; dnsServers?: SitesLansUpdateResponseStaticAddressingDhcpServerDnsServersList | null; /** Mapping of MAC addresses to IP addresses */ reservations?: SitesLansUpdateResponseStaticAddressingDhcpServerReservationsMap | null; } export const SitesLansUpdateResponseStaticAddressingDhcpServer = /*@__PURE__*/ S.suspend(() => S.Struct({ dhcpOptions: S.optional( S.NullOr( SitesLansUpdateResponseStaticAddressingDhcpServerDhcpOptionsList, ).pipe(T.Body("dhcp_options")), ), dhcpPoolEnd: S.optional(S.NullOr(S.String).pipe(T.Body("dhcp_pool_end"))), dhcpPoolStart: S.optional( S.NullOr(S.String).pipe(T.Body("dhcp_pool_start")), ), dnsServer: S.optional(S.NullOr(S.String).pipe(T.Body("dns_server"))), dnsServers: S.optional( S.NullOr( SitesLansUpdateResponseStaticAddressingDhcpServerDnsServersList, ).pipe(T.Body("dns_servers")), ), reservations: S.optional( S.NullOr( SitesLansUpdateResponseStaticAddressingDhcpServerReservationsMap, ), ), }), ).annotate({ identifier: "SitesLansUpdateResponseStaticAddressingDhcpServer", }) as any as S.Schema; export interface SitesLansUpdateResponseStaticAddressing { /** A valid CIDR notation representing an IP range. */ address: string; dhcpRelay?: SitesLansUpdateResponseStaticAddressingDhcpRelay | null; dhcpServer?: SitesLansUpdateResponseStaticAddressingDhcpServer | null; /** A valid CIDR notation representing an IP range. */ secondaryAddress?: string | null; /** A valid CIDR notation representing an IP range. */ virtualAddress?: string | null; } export const SitesLansUpdateResponseStaticAddressing = /*@__PURE__*/ S.suspend( () => S.Struct({ address: S.String, dhcpRelay: S.optional( S.NullOr(SitesLansUpdateResponseStaticAddressingDhcpRelay).pipe( T.Body("dhcp_relay"), ), ), dhcpServer: S.optional( S.NullOr(SitesLansUpdateResponseStaticAddressingDhcpServer).pipe( T.Body("dhcp_server"), ), ), secondaryAddress: S.optional( S.NullOr(S.String).pipe(T.Body("secondary_address")), ), virtualAddress: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_address")), ), }), ).annotate({ identifier: "SitesLansUpdateResponseStaticAddressing", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateSiteLanResponse { /** Identifier */ id?: string | null; bondId?: number | null; /** mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link. */ haLink?: boolean | null; /** mark true to use this LAN for source-based breakout traffic */ isBreakout?: boolean | null; /** mark true to use this LAN for source-based prioritized traffic */ isPrioritized?: boolean | null; name?: string | null; nat?: SitesLansCreateResultItemNat | null; physport?: number | null; routedSubnets?: SitesLansUpdateResponseRoutedSubnetsList | null; /** Identifier */ siteId?: string | null; /** If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address. */ staticAddressing?: SitesLansUpdateResponseStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const UpdateSiteLanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), bondId: S.optional(S.NullOr(S.Number).pipe(T.Body("bond_id"))), haLink: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ha_link"))), isBreakout: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_breakout"))), isPrioritized: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_prioritized")), ), name: S.optional(S.NullOr(S.String)), nat: S.optional(S.NullOr(SitesLansCreateResultItemNat)), physport: S.optional(S.NullOr(S.Number)), routedSubnets: S.optional( S.NullOr(SitesLansUpdateResponseRoutedSubnetsList).pipe( T.Body("routed_subnets"), ), ), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesLansUpdateResponseStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteLanResponse", }) as any as S.Schema; export type UpdateSitesAppConfigurationRequestPreferredWansList = Array; export const UpdateSitesAppConfigurationRequestPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateSitesAppConfigurationRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ appConfigId: string; /** Magic account app ID. */ accountAppId?: string; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean; /** Managed app ID. */ managedAppId?: string; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: UpdateSitesAppConfigurationRequestPreferredWansList; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number; } export const UpdateSitesAppConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), appConfigId: S.String.pipe(T.Label("app_config_id")), accountAppId: S.optional(S.String.pipe(T.Body("account_app_id"))), breakout: S.optional(S.Boolean), managedAppId: S.optional(S.String.pipe(T.Body("managed_app_id"))), preferredWans: S.optional( UpdateSitesAppConfigurationRequestPreferredWansList.pipe( T.Body("preferred_wans"), ), ), priority: S.optional(S.Number), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSitesAppConfigurationRequest", }) as any as S.Schema; export type UpdateSitesAppConfigurationResultAccountAppPreferredWansList = Array; export const UpdateSitesAppConfigurationResultAccountAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateSitesAppConfigurationResultAccountApp { /** Magic account app ID. */ accountAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: UpdateSitesAppConfigurationResultAccountAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const UpdateSitesAppConfigurationResultAccountApp = /*@__PURE__*/ S.suspend(() => S.Struct({ accountAppId: S.String.pipe(T.Body("account_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( UpdateSitesAppConfigurationResultAccountAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "UpdateSitesAppConfigurationResultAccountApp", }) as any as S.Schema; export type UpdateSitesAppConfigurationResultManagedAppPreferredWansList = Array; export const UpdateSitesAppConfigurationResultManagedAppPreferredWansList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateSitesAppConfigurationResultManagedApp { /** Managed app ID. */ managedAppId: string; /** Identifier */ id?: string | null; /** Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior. */ breakout?: boolean | null; /** WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true). */ preferredWans?: UpdateSitesAppConfigurationResultManagedAppPreferredWansList | null; /** Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported) */ priority?: number | null; /** Identifier */ siteId?: string | null; } export const UpdateSitesAppConfigurationResultManagedApp = /*@__PURE__*/ S.suspend(() => S.Struct({ managedAppId: S.String.pipe(T.Body("managed_app_id")), id: S.optional(S.NullOr(S.String)), breakout: S.optional(S.NullOr(S.Boolean)), preferredWans: S.optional( S.NullOr( UpdateSitesAppConfigurationResultManagedAppPreferredWansList, ).pipe(T.Body("preferred_wans")), ), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), }), ).annotate({ identifier: "UpdateSitesAppConfigurationResultManagedApp", }) as any as S.Schema; export type UpdateSitesAppConfigurationResult = | UpdateSitesAppConfigurationResultAccountApp | UpdateSitesAppConfigurationResultManagedApp; export const UpdateSitesAppConfigurationResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["accountAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ["managedAppId", "id", "breakout", "preferredWans", "priority", "siteId"], ]), ); export type UpdateSitesAppConfigurationResponse = UpdateSitesAppConfigurationResult; export const UpdateSitesAppConfigurationResponse = /*@__PURE__*/ S.suspend(() => UpdateSitesAppConfigurationResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "UpdateSitesAppConfigurationResponse", }) as any as S.Schema; export type SitesWansUpdateRequestStaticAddressing = SitesWansCreateRequestStaticAddressing; export const SitesWansUpdateRequestStaticAddressing = SitesWansCreateRequestStaticAddressing; export interface UpdateSiteWanRequest { /** Identifier */ accountId: string; /** Identifier */ siteId: string; /** Identifier */ wanId: string; name?: string; physport?: number; priority?: number; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateRequestStaticAddressing; /** VLAN ID. Use zero for untagged. */ vlanTag?: number; } export const UpdateSiteWanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), siteId: S.String.pipe(T.Label("site_id")), wanId: S.String.pipe(T.Label("wan_id")), name: S.optional(S.String), physport: S.optional(S.Number), priority: S.optional(S.Number), staticAddressing: S.optional( SitesWansCreateRequestStaticAddressing.pipe(T.Body("static_addressing")), ), vlanTag: S.optional(S.Number.pipe(T.Body("vlan_tag"))), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteWanRequest", }) as any as S.Schema; export type SitesWansUpdateResponseHealthCheckRate = "low" | "mid" | "high"; export const SitesWansUpdateResponseHealthCheckRate = /*@__PURE__*/ S.String; export type SitesWansUpdateResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; export const SitesWansUpdateResponseStaticAddressing = SitesWansCreateResultItemStaticAddressing; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateSiteWanResponse { /** Identifier */ id?: string | null; /** Magic WAN health check rate for tunnels created on this link. The default value is `mid`. */ healthCheckRate?: SitesWansUpdateResponseHealthCheckRate | null; name?: string | null; physport?: number | null; /** Priority of WAN for traffic loadbalancing. */ priority?: number | null; /** Identifier */ siteId?: string | null; /** (optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode. */ staticAddressing?: SitesWansCreateResultItemStaticAddressing | null; /** VLAN ID. Use zero for untagged. */ vlanTag?: number | null; } export const UpdateSiteWanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), healthCheckRate: S.optional( S.NullOr(SitesWansUpdateResponseHealthCheckRate).pipe( T.Body("health_check_rate"), ), ), name: S.optional(S.NullOr(S.String)), physport: S.optional(S.NullOr(S.Number)), priority: S.optional(S.NullOr(S.Number)), siteId: S.optional(S.NullOr(S.String).pipe(T.Body("site_id"))), staticAddressing: S.optional( S.NullOr(SitesWansCreateResultItemStaticAddressing).pipe( T.Body("static_addressing"), ), ), vlanTag: S.optional(S.NullOr(S.Number).pipe(T.Body("vlan_tag"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateSiteWanResponse", }) as any as S.Schema; export interface ValidatePcapOwnershipRequest { /** Identifier. */ accountId: string; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf: string; /** The ownership challenge filename stored in the bucket. */ ownershipChallenge: string; } export const ValidatePcapOwnershipRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), destinationConf: S.String.pipe(T.Body("destination_conf")), ownershipChallenge: S.String.pipe(T.Body("ownership_challenge")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/pcaps/ownership/validate", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ValidatePcapOwnershipRequest", }) as any as S.Schema; export type PcapsOwnershipValidateResponseStatus = | "pending" | "success" | "failed"; export const PcapsOwnershipValidateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ValidatePcapOwnershipResponse { /** The bucket ID associated with the packet captures API. */ id: string; /** The full URI for the bucket. This field only applies to `full` packet captures. */ destinationConf: string; /** The ownership challenge filename stored in the bucket. */ filename: string; /** The status of the ownership challenge. Can be pending, success or failed. */ status: PcapsOwnershipValidateResponseStatus; /** The RFC 3339 timestamp when the bucket was added to packet captures API. */ submitted: string; /** The RFC 3339 timestamp when the bucket was validated. */ validated?: string | null; } export const ValidatePcapOwnershipResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, destinationConf: S.String.pipe(T.Body("destination_conf")), filename: S.String, status: PcapsOwnershipValidateResponseStatus, submitted: S.String, validated: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ValidatePcapOwnershipResponse", }) as any as S.Schema; export type BulkPutCfInterconnectsError = CloudflareOpError; /** Updates multiple interconnects associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const bulkPutCfInterconnects: API.OperationMethod< BulkPutCfInterconnectsRequest, BulkPutCfInterconnectsResponse, BulkPutCfInterconnectsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkPutCfInterconnectsRequest, output: BulkPutCfInterconnectsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkPutGreTunnelsError = CloudflareOpError; /** Updates multiple GRE tunnels. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const bulkPutGreTunnels: API.OperationMethod< BulkPutGreTunnelsRequest, BulkPutGreTunnelsResponse, BulkPutGreTunnelsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkPutGreTunnelsRequest, output: BulkPutGreTunnelsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkPutIpsecTunnelsError = CloudflareOpError; /** Update multiple IPsec tunnels associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const bulkPutIpsecTunnels: API.OperationMethod< BulkPutIpsecTunnelsRequest, BulkPutIpsecTunnelsResponse, BulkPutIpsecTunnelsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkPutIpsecTunnelsRequest, output: BulkPutIpsecTunnelsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkPutRoutesError = CloudflareOpError; /** Update multiple Magic static routes. Use `?validate_only=true` as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided. */ export const bulkPutRoutes: API.OperationMethod< BulkPutRoutesRequest, BulkPutRoutesResponse, BulkPutRoutesError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkPutRoutesRequest, output: BulkPutRoutesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAppError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Creates a new App for an account */ export const createApp: API.OperationMethod< CreateAppRequest, CreateAppResponse, CreateAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAppRequest, output: CreateAppResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateCf1SiteError = CloudflareOpError; /** Creates new CF1 Sites for an account. Each site must have a unique name within the account. */ export const createCf1Site: API.PaginatedOperationMethod< CreateCf1SiteRequest, CreateCf1SiteResponse, CreateCf1SiteError, CloudflareOpContext, Cf1SitesCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: CreateCf1SiteRequest, output: CreateCf1SiteResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateCf1SiteRampError = CloudflareOpError; /** Creates ramps (network connections) for a CF1 Site. */ export const createCf1SiteRamp: API.PaginatedOperationMethod< CreateCf1SiteRampRequest, CreateCf1SiteRampResponse, CreateCf1SiteRampError, CloudflareOpContext, Cf1SitesRampsCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: CreateCf1SiteRampRequest, output: CreateCf1SiteRampResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateConnectorError = CloudflareOpError; /** Add a connector to your account */ export const createConnector: API.OperationMethod< CreateConnectorRequest, CreateConnectorResponse, CreateConnectorError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateConnectorRequest, output: CreateConnectorResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateGreTunnelError = | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Creates a new GRE tunnel. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const createGreTunnel: API.OperationMethod< CreateGreTunnelRequest, CreateGreTunnelResponse, CreateGreTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateGreTunnelRequest, output: CreateGreTunnelResponse, errors: [ MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateIpsecTunnelError = | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Creates a new IPsec tunnel associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const createIpsecTunnel: API.OperationMethod< CreateIpsecTunnelRequest, CreateIpsecTunnelResponse, CreateIpsecTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateIpsecTunnelRequest, output: CreateIpsecTunnelResponse, errors: [ MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreatePcapError = CloudflareOpError; /** Create new PCAP request for account. */ export const createPcap: API.OperationMethod< CreatePcapRequest, CreatePcapResponse, CreatePcapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePcapRequest, output: CreatePcapResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreatePcapOwnershipError = CloudflareOpError; /** Adds an AWS or GCP bucket to use with full packet captures. */ export const createPcapOwnership: API.OperationMethod< CreatePcapOwnershipRequest, CreatePcapOwnershipResponse, CreatePcapOwnershipError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePcapOwnershipRequest, output: CreatePcapOwnershipResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateRouteError = | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Creates a new Magic static route. Use `?validate_only=true` as an optional query parameter to run validation only without persisting changes. */ export const createRoute: API.OperationMethod< CreateRouteRequest, CreateRouteResponse, CreateRouteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRouteRequest, output: CreateRouteResponse, errors: [ MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSiteError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Creates a new Site */ export const createSite: API.OperationMethod< CreateSiteRequest, CreateSiteResponse, CreateSiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSiteRequest, output: CreateSiteResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSiteAclError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Creates a new Site ACL. */ export const createSiteAcl: API.OperationMethod< CreateSiteAclRequest, CreateSiteAclResponse, CreateSiteAclError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSiteAclRequest, output: CreateSiteAclResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSiteLanError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address. */ export const createSiteLan: API.PaginatedOperationMethod< CreateSiteLanRequest, CreateSiteLanResponse, CreateSiteLanError, CloudflareOpContext, SitesLansCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: CreateSiteLanRequest, output: CreateSiteLanResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateSitesAppConfigurationError = CloudflareOpError; /** Creates a new App Config for a site */ export const createSitesAppConfiguration: API.OperationMethod< CreateSitesAppConfigurationRequest, CreateSitesAppConfigurationResponse, CreateSitesAppConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSitesAppConfigurationRequest, output: CreateSitesAppConfigurationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSiteWanError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Creates a new Site WAN. */ export const createSiteWan: API.PaginatedOperationMethod< CreateSiteWanRequest, CreateSiteWanResponse, CreateSiteWanError, CloudflareOpContext, SitesWansCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: CreateSiteWanRequest, output: CreateSiteWanResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type DeleteAppError = | AppNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Deletes specific Account App. */ export const deleteApp: API.OperationMethod< DeleteAppRequest, DeleteAppResponse, DeleteAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAppRequest, output: DeleteAppResponse, errors: [ AppNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteCf1SiteError = CloudflareOpError; /** Deletes a specific CF1 Site for an account. */ export const deleteCf1Site: API.OperationMethod< DeleteCf1SiteRequest, DeleteCf1SiteResponse, DeleteCf1SiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteCf1SiteRequest, output: DeleteCf1SiteResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteCf1SiteRampError = CloudflareOpError; /** Deletes a specific ramp from a CF1 Site. */ export const deleteCf1SiteRamp: API.OperationMethod< DeleteCf1SiteRampRequest, DeleteCf1SiteRampResponse, DeleteCf1SiteRampError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteCf1SiteRampRequest, output: DeleteCf1SiteRampResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteConnectorError = CloudflareOpError; /** Remove a connector from your account */ export const deleteConnector: API.OperationMethod< DeleteConnectorRequest, DeleteConnectorResponse, DeleteConnectorError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteConnectorRequest, output: DeleteConnectorResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteGreTunnelError = | GreTunnelNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Disables and removes a specific static GRE tunnel. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const deleteGreTunnel: API.OperationMethod< DeleteGreTunnelRequest, DeleteGreTunnelResponse, DeleteGreTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteGreTunnelRequest, output: DeleteGreTunnelResponse, errors: [ GreTunnelNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteIpsecTunnelError = | IpsecTunnelNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Disables and removes a specific static IPsec Tunnel associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const deleteIpsecTunnel: API.OperationMethod< DeleteIpsecTunnelRequest, DeleteIpsecTunnelResponse, DeleteIpsecTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteIpsecTunnelRequest, output: DeleteIpsecTunnelResponse, errors: [ IpsecTunnelNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeletePcapOwnershipError = CloudflareOpError; /** Deletes buckets added to the packet captures API. */ export const deletePcapOwnership: API.OperationMethod< DeletePcapOwnershipRequest, DeletePcapOwnershipResponse, DeletePcapOwnershipError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeletePcapOwnershipRequest, output: DeletePcapOwnershipResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRouteError = | RouteNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Disable and remove a specific Magic static route. */ export const deleteRoute: API.OperationMethod< DeleteRouteRequest, DeleteRouteResponse, DeleteRouteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRouteRequest, output: DeleteRouteResponse, errors: [ RouteNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSiteError = | SiteNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Remove a specific Site. */ export const deleteSite: API.OperationMethod< DeleteSiteRequest, DeleteSiteResponse, DeleteSiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSiteRequest, output: DeleteSiteResponse, errors: [ SiteNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSiteAclError = | SiteAclNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Remove a specific Site ACL. */ export const deleteSiteAcl: API.OperationMethod< DeleteSiteAclRequest, DeleteSiteAclResponse, DeleteSiteAclError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSiteAclRequest, output: DeleteSiteAclResponse, errors: [ SiteAclNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSiteLanError = | SiteLanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Remove a specific Site LAN. */ export const deleteSiteLan: API.OperationMethod< DeleteSiteLanRequest, DeleteSiteLanResponse, DeleteSiteLanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSiteLanRequest, output: DeleteSiteLanResponse, errors: [ SiteLanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSitesAppConfigurationError = CloudflareOpError; /** Deletes specific App Config associated with a site. */ export const deleteSitesAppConfiguration: API.OperationMethod< DeleteSitesAppConfigurationRequest, DeleteSitesAppConfigurationResponse, DeleteSitesAppConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSitesAppConfigurationRequest, output: DeleteSitesAppConfigurationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSiteWanError = | SiteWanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Remove a specific Site WAN. */ export const deleteSiteWan: API.OperationMethod< DeleteSiteWanRequest, DeleteSiteWanResponse, DeleteSiteWanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSiteWanRequest, output: DeleteSiteWanResponse, errors: [ SiteWanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type EditSitesAppConfigurationError = CloudflareOpError; /** Updates an App Config for a site */ export const editSitesAppConfiguration: API.OperationMethod< EditSitesAppConfigurationRequest, EditSitesAppConfigurationResponse, EditSitesAppConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: EditSitesAppConfigurationRequest, output: EditSitesAppConfigurationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type EmptyRouteError = CloudflareOpError; /** Delete multiple Magic static routes. */ export const emptyRoute: API.OperationMethod< EmptyRouteRequest, EmptyRouteResponse, EmptyRouteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: EmptyRouteRequest, output: EmptyRouteResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCf1SiteError = CloudflareOpError; /** Gets a specific CF1 Site for an account. */ export const getCf1Site: API.OperationMethod< GetCf1SiteRequest, GetCf1SiteResponse, GetCf1SiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCf1SiteRequest, output: GetCf1SiteResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCf1SiteRampError = CloudflareOpError; /** Gets a specific ramp for a CF1 Site. */ export const getCf1SiteRamp: API.OperationMethod< GetCf1SiteRampRequest, GetCf1SiteRampResponse, GetCf1SiteRampError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCf1SiteRampRequest, output: GetCf1SiteRampResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCfInterconnectError = CloudflareOpError; /** Lists details for a specific interconnect. */ export const getCfInterconnect: API.OperationMethod< GetCfInterconnectRequest, GetCfInterconnectResponse, GetCfInterconnectError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCfInterconnectRequest, output: GetCfInterconnectResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetConnectorError = CloudflareOpError; /** Fetch Connector */ export const getConnector: API.OperationMethod< GetConnectorRequest, GetConnectorResponse, GetConnectorError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetConnectorRequest, output: GetConnectorResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetConnectorEventError = CloudflareOpError; /** Get Event */ export const getConnectorEvent: API.OperationMethod< GetConnectorEventRequest, GetConnectorEventResponse, GetConnectorEventError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetConnectorEventRequest, output: GetConnectorEventResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetConnectorSnapshotError = CloudflareOpError; /** Get Snapshot */ export const getConnectorSnapshot: API.OperationMethod< GetConnectorSnapshotRequest, GetConnectorSnapshotResponse, GetConnectorSnapshotError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetConnectorSnapshotRequest, output: GetConnectorSnapshotResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetGreTunnelError = | GreTunnelNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Lists informtion for a specific GRE tunnel. */ export const getGreTunnel: API.OperationMethod< GetGreTunnelRequest, GetGreTunnelResponse, GetGreTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetGreTunnelRequest, output: GetGreTunnelResponse, errors: [ GreTunnelNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetIpsecTunnelError = | IpsecTunnelNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Lists details for a specific IPsec tunnel. */ export const getIpsecTunnel: API.OperationMethod< GetIpsecTunnelRequest, GetIpsecTunnelResponse, GetIpsecTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetIpsecTunnelRequest, output: GetIpsecTunnelResponse, errors: [ IpsecTunnelNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPcapError = CloudflareOpError; /** Get information for a PCAP request by id. */ export const getPcap: API.OperationMethod< GetPcapRequest, GetPcapResponse, GetPcapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPcapRequest, output: GetPcapResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPcapDownloadError = CloudflareOpError; /** Download PCAP information into a file. Response is a binary PCAP file. */ export const getPcapDownload: API.OperationMethod< GetPcapDownloadRequest, GetPcapDownloadResponse, GetPcapDownloadError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPcapDownloadRequest, output: GetPcapDownloadResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPcapOwnershipError = CloudflareOpError; /** List all buckets configured for use with PCAPs API. */ export const getPcapOwnership: API.PaginatedOperationMethod< GetPcapOwnershipRequest, GetPcapOwnershipResponse, GetPcapOwnershipError, CloudflareOpContext, PcapsOwnershipGetResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: GetPcapOwnershipRequest, output: GetPcapOwnershipResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type GetRouteError = | RouteNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Get a specific Magic static route. */ export const getRoute: API.OperationMethod< GetRouteRequest, GetRouteResponse, GetRouteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetRouteRequest, output: GetRouteResponse, errors: [ RouteNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSiteError = | SiteNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Get a specific Site. */ export const getSite: API.OperationMethod< GetSiteRequest, GetSiteResponse, GetSiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSiteRequest, output: GetSiteResponse, errors: [ SiteNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSiteAclError = | SiteAclNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Get a specific Site ACL. */ export const getSiteAcl: API.OperationMethod< GetSiteAclRequest, GetSiteAclResponse, GetSiteAclError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSiteAclRequest, output: GetSiteAclResponse, errors: [ SiteAclNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSiteLanError = | SiteLanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Get a specific Site LAN. */ export const getSiteLan: API.OperationMethod< GetSiteLanRequest, GetSiteLanResponse, GetSiteLanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSiteLanRequest, output: GetSiteLanResponse, errors: [ SiteLanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSiteWanError = | SiteWanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Get a specific Site WAN. */ export const getSiteWan: API.OperationMethod< GetSiteWanRequest, GetSiteWanResponse, GetSiteWanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSiteWanRequest, output: GetSiteWanResponse, errors: [ SiteWanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListAppsError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Lists Apps associated with an account. */ export const listApps: API.PaginatedOperationMethod< ListAppsRequest, ListAppsResponse, ListAppsError, CloudflareOpContext, AppsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAppsRequest, output: ListAppsResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListCf1SiteRampsError = CloudflareOpError; /** Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links. */ export const listCf1SiteRamps: API.PaginatedOperationMethod< ListCf1SiteRampsRequest, ListCf1SiteRampsResponse, ListCf1SiteRampsError, CloudflareOpContext, Cf1SitesRampsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCf1SiteRampsRequest, output: ListCf1SiteRampsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListCf1SitesError = CloudflareOpError; /** Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates. */ export const listCf1Sites: API.PaginatedOperationMethod< ListCf1SitesRequest, ListCf1SitesResponse, ListCf1SitesError, CloudflareOpContext, Cf1SitesCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCf1SitesRequest, output: ListCf1SitesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListCfInterconnectsError = CloudflareOpError; /** Lists interconnects associated with an account. */ export const listCfInterconnects: API.OperationMethod< ListCfInterconnectsRequest, ListCfInterconnectsResponse, ListCfInterconnectsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListCfInterconnectsRequest, output: ListCfInterconnectsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListConnectorEventLatestsError = CloudflareOpError; /** Get latest Events */ export const listConnectorEventLatests: API.OperationMethod< ListConnectorEventLatestsRequest, ListConnectorEventLatestsResponse, ListConnectorEventLatestsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListConnectorEventLatestsRequest, output: ListConnectorEventLatestsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListConnectorEventsError = CloudflareOpError; /** List Events */ export const listConnectorEvents: API.OperationMethod< ListConnectorEventsRequest, ListConnectorEventsResponse, ListConnectorEventsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListConnectorEventsRequest, output: ListConnectorEventsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListConnectorsError = CloudflareOpError; /** List Connectors */ export const listConnectors: API.PaginatedOperationMethod< ListConnectorsRequest, ListConnectorsResponse, ListConnectorsError, CloudflareOpContext, ConnectorsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListConnectorsRequest, output: ListConnectorsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListConnectorSnapshotLatestsError = CloudflareOpError; /** Get latest Snapshots */ export const listConnectorSnapshotLatests: API.OperationMethod< ListConnectorSnapshotLatestsRequest, ListConnectorSnapshotLatestsResponse, ListConnectorSnapshotLatestsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListConnectorSnapshotLatestsRequest, output: ListConnectorSnapshotLatestsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListConnectorSnapshotsError = CloudflareOpError; /** List Snapshots */ export const listConnectorSnapshots: API.OperationMethod< ListConnectorSnapshotsRequest, ListConnectorSnapshotsResponse, ListConnectorSnapshotsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListConnectorSnapshotsRequest, output: ListConnectorSnapshotsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListGreTunnelsError = | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Lists GRE tunnels associated with an account. */ export const listGreTunnels: API.OperationMethod< ListGreTunnelsRequest, ListGreTunnelsResponse, ListGreTunnelsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListGreTunnelsRequest, output: ListGreTunnelsResponse, errors: [ MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListIpsecTunnelsError = | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Lists IPsec tunnels associated with an account. */ export const listIpsecTunnels: API.OperationMethod< ListIpsecTunnelsRequest, ListIpsecTunnelsResponse, ListIpsecTunnelsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListIpsecTunnelsRequest, output: ListIpsecTunnelsResponse, errors: [ MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListPcapsError = CloudflareOpError; /** Lists all packet capture requests for an account. */ export const listPcaps: API.PaginatedOperationMethod< ListPcapsRequest, ListPcapsResponse, ListPcapsError, CloudflareOpContext, PcapsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPcapsRequest, output: ListPcapsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListRoutesError = | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** List all Magic static routes. */ export const listRoutes: API.OperationMethod< ListRoutesRequest, ListRoutesResponse, ListRoutesError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListRoutesRequest, output: ListRoutesResponse, errors: [ MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListSiteAclsError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Lists Site ACLs associated with an account. */ export const listSiteAcls: API.PaginatedOperationMethod< ListSiteAclsRequest, ListSiteAclsResponse, ListSiteAclsError, CloudflareOpContext, SitesAclsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSiteAclsRequest, output: ListSiteAclsResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSiteLansError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Lists Site LANs associated with an account. */ export const listSiteLans: API.PaginatedOperationMethod< ListSiteLansRequest, ListSiteLansResponse, ListSiteLansError, CloudflareOpContext, SitesLansListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSiteLansRequest, output: ListSiteLansResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSitesError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID. */ export const listSites: API.PaginatedOperationMethod< ListSitesRequest, ListSitesResponse, ListSitesError, CloudflareOpContext, SitesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSitesRequest, output: ListSitesResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSitesAppConfigurationError = CloudflareOpError; /** Lists App Configs associated with a site. */ export const listSitesAppConfiguration: API.OperationMethod< ListSitesAppConfigurationRequest, ListSitesAppConfigurationResponse, ListSitesAppConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListSitesAppConfigurationRequest, output: ListSitesAppConfigurationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListSiteWansError = | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Lists Site WANs associated with an account. */ export const listSiteWans: API.PaginatedOperationMethod< ListSiteWansRequest, ListSiteWansResponse, ListSiteWansError, CloudflareOpContext, SitesWansListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSiteWansRequest, output: ListSiteWansResponse, errors: [ MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchAppError = | AppNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Updates an Account App */ export const patchApp: API.OperationMethod< PatchAppRequest, PatchAppResponse, PatchAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAppRequest, output: PatchAppResponse, errors: [ AppNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchCf1SiteError = CloudflareOpError; /** Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values. */ export const patchCf1Site: API.OperationMethod< PatchCf1SiteRequest, PatchCf1SiteResponse, PatchCf1SiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchCf1SiteRequest, output: PatchCf1SiteResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchConnectorError = CloudflareOpError; /** Edit Connector to update specific properties or Re-provision License Key */ export const patchConnector: API.OperationMethod< PatchConnectorRequest, PatchConnectorResponse, PatchConnectorError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchConnectorRequest, output: PatchConnectorResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSiteError = | SiteNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Patch a specific Site. */ export const patchSite: API.OperationMethod< PatchSiteRequest, PatchSiteResponse, PatchSiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSiteRequest, output: PatchSiteResponse, errors: [ SiteNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSiteAclError = | SiteAclNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Patch a specific Site ACL. */ export const patchSiteAcl: API.OperationMethod< PatchSiteAclRequest, PatchSiteAclResponse, PatchSiteAclError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSiteAclRequest, output: PatchSiteAclResponse, errors: [ SiteAclNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSiteLanError = | SiteLanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Patch a specific Site LAN. */ export const patchSiteLan: API.OperationMethod< PatchSiteLanRequest, PatchSiteLanResponse, PatchSiteLanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSiteLanRequest, output: PatchSiteLanResponse, errors: [ SiteLanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSiteWanError = | SiteWanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Patch a specific Site WAN. */ export const patchSiteWan: API.OperationMethod< PatchSiteWanRequest, PatchSiteWanResponse, PatchSiteWanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSiteWanRequest, output: PatchSiteWanResponse, errors: [ SiteWanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PskGenerateIpsecTunnelError = CloudflareOpError; /** Generates a Pre-Shared Key for a specific IPsec tunnel used in the IKE session. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSK in a safe place. */ export const pskGenerateIpsecTunnel: API.OperationMethod< PskGenerateIpsecTunnelRequest, PskGenerateIpsecTunnelResponse, PskGenerateIpsecTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PskGenerateIpsecTunnelRequest, output: PskGenerateIpsecTunnelResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PskSetIpsecTunnelError = CloudflareOpError; /** Sets Pre-Shared Keys for multiple IPsec tunnels associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. After PSKs are applied, they are immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSKs in a safe place. */ export const pskSetIpsecTunnel: API.OperationMethod< PskSetIpsecTunnelRequest, PskSetIpsecTunnelResponse, PskSetIpsecTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PskSetIpsecTunnelRequest, output: PskSetIpsecTunnelResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutCfInterconnectError = CloudflareOpError; /** Updates a specific interconnect associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const putCfInterconnect: API.OperationMethod< PutCfInterconnectRequest, PutCfInterconnectResponse, PutCfInterconnectError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutCfInterconnectRequest, output: PutCfInterconnectResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type StopPcapError = CloudflareOpError; /** Stop full PCAP. */ export const stopPcap: API.OperationMethod< StopPcapRequest, StopPcapResponse, StopPcapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: StopPcapRequest, output: StopPcapResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateAppError = | AppNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Updates an Account App */ export const updateApp: API.OperationMethod< UpdateAppRequest, UpdateAppResponse, UpdateAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateAppRequest, output: UpdateAppResponse, errors: [ AppNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateConnectorError = CloudflareOpError; /** Replace Connector or Re-provision License Key */ export const updateConnector: API.OperationMethod< UpdateConnectorRequest, UpdateConnectorResponse, UpdateConnectorError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateConnectorRequest, output: UpdateConnectorResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateGreTunnelError = | GreTunnelNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Updates a specific GRE tunnel. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const updateGreTunnel: API.OperationMethod< UpdateGreTunnelRequest, UpdateGreTunnelResponse, UpdateGreTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateGreTunnelRequest, output: UpdateGreTunnelResponse, errors: [ GreTunnelNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateIpsecTunnelError = | IpsecTunnelNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Updates a specific IPsec tunnel associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. */ export const updateIpsecTunnel: API.OperationMethod< UpdateIpsecTunnelRequest, UpdateIpsecTunnelResponse, UpdateIpsecTunnelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateIpsecTunnelRequest, output: UpdateIpsecTunnelResponse, errors: [ IpsecTunnelNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateRouteError = | RouteNotFound | MagicTransitNotOnboarded | Forbidden | CloudflareOpError; /** Update a specific Magic static route. Use `?validate_only=true` as an optional query parameter to run validation only without persisting changes. */ export const updateRoute: API.OperationMethod< UpdateRouteRequest, UpdateRouteResponse, UpdateRouteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateRouteRequest, output: UpdateRouteResponse, errors: [ RouteNotFound, MagicTransitNotOnboarded, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateSiteError = | SiteNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Update a specific Site. */ export const updateSite: API.OperationMethod< UpdateSiteRequest, UpdateSiteResponse, UpdateSiteError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateSiteRequest, output: UpdateSiteResponse, errors: [ SiteNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateSiteAclError = | SiteAclNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Update a specific Site ACL. */ export const updateSiteAcl: API.OperationMethod< UpdateSiteAclRequest, UpdateSiteAclResponse, UpdateSiteAclError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateSiteAclRequest, output: UpdateSiteAclResponse, errors: [ SiteAclNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateSiteLanError = | SiteLanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Update a specific Site LAN. */ export const updateSiteLan: API.OperationMethod< UpdateSiteLanRequest, UpdateSiteLanResponse, UpdateSiteLanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateSiteLanRequest, output: UpdateSiteLanResponse, errors: [ SiteLanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateSitesAppConfigurationError = CloudflareOpError; /** Updates an App Config for a site */ export const updateSitesAppConfiguration: API.OperationMethod< UpdateSitesAppConfigurationRequest, UpdateSitesAppConfigurationResponse, UpdateSitesAppConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateSitesAppConfigurationRequest, output: UpdateSitesAppConfigurationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateSiteWanError = | SiteWanNotFound | MagicWanUnauthorized | Forbidden | CloudflareOpError; /** Update a specific Site WAN. */ export const updateSiteWan: API.OperationMethod< UpdateSiteWanRequest, UpdateSiteWanResponse, UpdateSiteWanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateSiteWanRequest, output: UpdateSiteWanResponse, errors: [ SiteWanNotFound, MagicWanUnauthorized, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ValidatePcapOwnershipError = CloudflareOpError; /** Validates buckets added to the packet captures API. */ export const validatePcapOwnership: API.OperationMethod< ValidatePcapOwnershipRequest, ValidatePcapOwnershipResponse, ValidatePcapOwnershipError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ValidatePcapOwnershipRequest, output: ValidatePcapOwnershipResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));