// 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> = { argoSmartRouting: "argo_smart_routing", createdOn: "created_on", dataLag: "data_lag", edgeIps: "edge_ips", ipFirewall: "ip_firewall", modifiedOn: "modified_on", originDirect: "origin_direct", originDns: "origin_dns", originPort: "origin_port", perPage: "per_page", proxyProtocol: "proxy_protocol", resultInfo: "result_info", timeIntervals: "time_intervals", totalCount: "total_count", trafficType: "traffic_type", virtualNetworkId: "virtual_network_id", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class SpectrumAppNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SpectrumAppNotFound", { code: S.Number, message: S.String, }), [{ code: 10006 }], ) {} export class SpectrumProtocolNotAvailable extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "SpectrumProtocolNotAvailable", { code: S.Number, message: S.String, }, ), [{ code: 13002 }], ) {} export type AppsCreateRequestDnsSpectrumConfigAppConfigType = | "CNAME" | "ADDRESS"; export const AppsCreateRequestDnsSpectrumConfigAppConfigType = /*@__PURE__*/ S.String; export interface AppsCreateRequestDnsSpectrumConfigAppConfig { /** The name of the DNS record associated with the application. */ name?: string; /** The type of DNS record associated with the application. */ type?: AppsCreateRequestDnsSpectrumConfigAppConfigType | (string & {}); } export const AppsCreateRequestDnsSpectrumConfigAppConfig = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.String), type: S.optional(AppsCreateRequestDnsSpectrumConfigAppConfigType), }), ).annotate({ identifier: "AppsCreateRequestDnsSpectrumConfigAppConfig", }) as any as S.Schema; export type AppsCreateRequestTrafficType = "direct" | "http" | "https"; export const AppsCreateRequestTrafficType = /*@__PURE__*/ S.String; export type AppsCreateRequestEdgeIpsDynamicConnectivity = | "all" | "ipv4" | "ipv6"; export const AppsCreateRequestEdgeIpsDynamicConnectivity = /*@__PURE__*/ S.String; export type AppsCreateRequestEdgeIpsDynamicType = "dynamic"; export const AppsCreateRequestEdgeIpsDynamicType = /*@__PURE__*/ S.String; export interface AppsCreateRequestEdgeIpsDynamic { /** The IP versions supported for inbound connections on Spectrum anycast IPs. */ connectivity?: AppsCreateRequestEdgeIpsDynamicConnectivity | (string & {}); /** The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. */ type?: AppsCreateRequestEdgeIpsDynamicType | (string & {}); } export const AppsCreateRequestEdgeIpsDynamic = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivity: S.optional(AppsCreateRequestEdgeIpsDynamicConnectivity), type: S.optional(AppsCreateRequestEdgeIpsDynamicType), }), ).annotate({ identifier: "AppsCreateRequestEdgeIpsDynamic", }) as any as S.Schema; export type AppsCreateRequestEdgeIpsStaticIpsList = Array; export const AppsCreateRequestEdgeIpsStaticIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateRequestEdgeIpsStaticType = "static"; export const AppsCreateRequestEdgeIpsStaticType = /*@__PURE__*/ S.String; export interface AppsCreateRequestEdgeIpsStatic { /** The array of customer owned IPs we broadcast via anycast for this hostname and application. */ ips?: AppsCreateRequestEdgeIpsStaticIpsList; /** The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names. */ type?: AppsCreateRequestEdgeIpsStaticType | (string & {}); } export const AppsCreateRequestEdgeIpsStatic = /*@__PURE__*/ S.suspend(() => S.Struct({ ips: S.optional(AppsCreateRequestEdgeIpsStaticIpsList), type: S.optional(AppsCreateRequestEdgeIpsStaticType), }), ).annotate({ identifier: "AppsCreateRequestEdgeIpsStatic", }) as any as S.Schema; export type AppsCreateRequestEdgeIps = | AppsCreateRequestEdgeIpsDynamic | AppsCreateRequestEdgeIpsStatic; export const AppsCreateRequestEdgeIps = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["connectivity", "type"], ["ips", "type"], ]), ); export type AppsCreateRequestOriginDirectList = Array; export const AppsCreateRequestOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateRequestOriginDnsType = "" | "A" | "AAAA" | "SRV"; export const AppsCreateRequestOriginDnsType = /*@__PURE__*/ S.String; export interface AppsCreateRequestOriginDns { /** The name of the DNS record associated with the origin. */ name?: string; /** The TTL of our resolution of your DNS record in seconds. */ ttl?: number; /** The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. */ type?: AppsCreateRequestOriginDnsType | (string & {}); } export const AppsCreateRequestOriginDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.String), ttl: S.optional(S.Number), type: S.optional(AppsCreateRequestOriginDnsType), }), ).annotate({ identifier: "AppsCreateRequestOriginDns", }) as any as S.Schema; export type AppsCreateRequestOriginPort = string | number; export const AppsCreateRequestOriginPort = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], []]), ); export type AppsCreateRequestProxyProtocol = "off" | "v1" | "v2" | "simple"; export const AppsCreateRequestProxyProtocol = /*@__PURE__*/ S.String; export type AppsCreateRequestTls = "off" | "flexible" | "full" | "strict"; export const AppsCreateRequestTls = /*@__PURE__*/ S.String; export interface CreateAppRequest { /** Zone identifier. */ zoneId: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsCreateRequestDnsSpectrumConfigAppConfig; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. */ trafficType?: AppsCreateRequestTrafficType | (string & {}); /** Enables Argo Smart Routing for this application. */ argoSmartRouting?: boolean; /** The anycast edge IP configuration for the hostname of this application. */ edgeIps?: AppsCreateRequestEdgeIps; /** Enables IP Access Rules for this application. */ ipFirewall?: boolean; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsCreateRequestOriginDirectList; /** The name and type of DNS record for the Spectrum application. */ originDns?: AppsCreateRequestOriginDns; /** The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. */ originPort?: AppsCreateRequestOriginPort; /** Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. */ proxyProtocol?: AppsCreateRequestProxyProtocol | (string & {}); /** The type of TLS termination associated with the application. */ tls?: AppsCreateRequestTls | (string & {}); /** Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks. */ virtualNetworkId?: string; } export const CreateAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), dns: AppsCreateRequestDnsSpectrumConfigAppConfig, protocol: S.String, trafficType: S.optional( AppsCreateRequestTrafficType.pipe(T.Body("traffic_type")), ), argoSmartRouting: S.optional(S.Boolean.pipe(T.Body("argo_smart_routing"))), edgeIps: S.optional(AppsCreateRequestEdgeIps.pipe(T.Body("edge_ips"))), ipFirewall: S.optional(S.Boolean.pipe(T.Body("ip_firewall"))), originDirect: S.optional( AppsCreateRequestOriginDirectList.pipe(T.Body("origin_direct")), ), originDns: S.optional( AppsCreateRequestOriginDns.pipe(T.Body("origin_dns")), ), originPort: S.optional( AppsCreateRequestOriginPort.pipe(T.Body("origin_port")), ), proxyProtocol: S.optional( AppsCreateRequestProxyProtocol.pipe(T.Body("proxy_protocol")), ), tls: S.optional(AppsCreateRequestTls), virtualNetworkId: S.optional(S.String.pipe(T.Body("virtual_network_id"))), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/spectrum/apps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAppRequest", }) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigDnsType = | "CNAME" | "ADDRESS"; export const AppsCreateResultSpectrumConfigAppConfigDnsType = /*@__PURE__*/ S.String; export interface AppsCreateResultSpectrumConfigAppConfigDns { /** The name of the DNS record associated with the application. */ name?: string | null; /** The type of DNS record associated with the application. */ type?: AppsCreateResultSpectrumConfigAppConfigDnsType | null; } export const AppsCreateResultSpectrumConfigAppConfigDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), type: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigDnsType), ), }), ).annotate({ identifier: "AppsCreateResultSpectrumConfigAppConfigDns", }) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigTrafficType = | "direct" | "http" | "https"; export const AppsCreateResultSpectrumConfigAppConfigTrafficType = /*@__PURE__*/ S.String; export type AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity = | "all" | "ipv4" | "ipv6"; export const AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity = /*@__PURE__*/ S.String; export type AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicType = "dynamic"; export const AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicType = /*@__PURE__*/ S.String; export interface AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamic { /** The IP versions supported for inbound connections on Spectrum anycast IPs. */ connectivity?: AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity | null; /** The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. */ type?: AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicType | null; } export const AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamic = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivity: S.optional( S.NullOr( AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity, ), ), type: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamicType), ), }), ).annotate({ identifier: "AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamic", }) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList = Array; export const AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticType = "static"; export const AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticType = /*@__PURE__*/ S.String; export interface AppsCreateResultSpectrumConfigAppConfigEdgeIpsStatic { /** The array of customer owned IPs we broadcast via anycast for this hostname and application. */ ips?: AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList | null; /** The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names. */ type?: AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticType | null; } export const AppsCreateResultSpectrumConfigAppConfigEdgeIpsStatic = /*@__PURE__*/ S.suspend(() => S.Struct({ ips: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList), ), type: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigEdgeIpsStaticType), ), }), ).annotate({ identifier: "AppsCreateResultSpectrumConfigAppConfigEdgeIpsStatic", }) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigEdgeIps = | AppsCreateResultSpectrumConfigAppConfigEdgeIpsDynamic | AppsCreateResultSpectrumConfigAppConfigEdgeIpsStatic; export const AppsCreateResultSpectrumConfigAppConfigEdgeIps = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["connectivity", "type"], ["ips", "type"], ]), ); export type AppsCreateResultSpectrumConfigAppConfigOriginDirectList = Array; export const AppsCreateResultSpectrumConfigAppConfigOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigOriginDnsType = | "" | "A" | "AAAA" | "SRV"; export const AppsCreateResultSpectrumConfigAppConfigOriginDnsType = /*@__PURE__*/ S.String; export interface AppsCreateResultSpectrumConfigAppConfigOriginDns { /** The name of the DNS record associated with the origin. */ name?: string | null; /** The TTL of our resolution of your DNS record in seconds. */ ttl?: number | null; /** The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. */ type?: AppsCreateResultSpectrumConfigAppConfigOriginDnsType | null; } export const AppsCreateResultSpectrumConfigAppConfigOriginDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), ttl: S.optional(S.NullOr(S.Number)), type: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigOriginDnsType), ), }), ).annotate({ identifier: "AppsCreateResultSpectrumConfigAppConfigOriginDns", }) as any as S.Schema; export type AppsCreateResultSpectrumConfigAppConfigOriginPort = string | number; export const AppsCreateResultSpectrumConfigAppConfigOriginPort = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []])); export type AppsCreateResultSpectrumConfigAppConfigProxyProtocol = | "off" | "v1" | "v2" | "simple"; export const AppsCreateResultSpectrumConfigAppConfigProxyProtocol = /*@__PURE__*/ S.String; export type AppsCreateResultSpectrumConfigAppConfigTls = | "off" | "flexible" | "full" | "strict"; export const AppsCreateResultSpectrumConfigAppConfigTls = /*@__PURE__*/ S.String; export interface AppsCreateResultSpectrumConfigAppConfig { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsCreateResultSpectrumConfigAppConfigDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. */ trafficType: AppsCreateResultSpectrumConfigAppConfigTrafficType; /** Enables Argo Smart Routing for this application. */ argoSmartRouting?: boolean | null; /** The anycast edge IP configuration for the hostname of this application. */ edgeIps?: AppsCreateResultSpectrumConfigAppConfigEdgeIps | null; /** Enables IP Access Rules for this application. */ ipFirewall?: boolean | null; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsCreateResultSpectrumConfigAppConfigOriginDirectList | null; /** The name and type of DNS record for the Spectrum application. */ originDns?: AppsCreateResultSpectrumConfigAppConfigOriginDns | null; /** The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. */ originPort?: AppsCreateResultSpectrumConfigAppConfigOriginPort | null; /** Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. */ proxyProtocol?: AppsCreateResultSpectrumConfigAppConfigProxyProtocol | null; /** The type of TLS termination associated with the application. */ tls?: AppsCreateResultSpectrumConfigAppConfigTls | null; /** Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks. */ virtualNetworkId?: string | null; } export const AppsCreateResultSpectrumConfigAppConfig = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsCreateResultSpectrumConfigAppConfigDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, trafficType: AppsCreateResultSpectrumConfigAppConfigTrafficType.pipe( T.Body("traffic_type"), ), argoSmartRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("argo_smart_routing")), ), edgeIps: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigEdgeIps).pipe( T.Body("edge_ips"), ), ), ipFirewall: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ip_firewall"))), originDirect: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigOriginDirectList).pipe( T.Body("origin_direct"), ), ), originDns: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigOriginDns).pipe( T.Body("origin_dns"), ), ), originPort: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigOriginPort).pipe( T.Body("origin_port"), ), ), proxyProtocol: S.optional( S.NullOr(AppsCreateResultSpectrumConfigAppConfigProxyProtocol).pipe( T.Body("proxy_protocol"), ), ), tls: S.optional(S.NullOr(AppsCreateResultSpectrumConfigAppConfigTls)), virtualNetworkId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_network_id")), ), }), ).annotate({ identifier: "AppsCreateResultSpectrumConfigAppConfig", }) as any as S.Schema; export type AppsCreateResultSpectrumConfigPaygoAppConfigOriginDirectList = Array; export const AppsCreateResultSpectrumConfigPaygoAppConfigOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AppsCreateResultSpectrumConfigPaygoAppConfig { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsCreateResultSpectrumConfigAppConfigDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsCreateResultSpectrumConfigPaygoAppConfigOriginDirectList | null; } export const AppsCreateResultSpectrumConfigPaygoAppConfig = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsCreateResultSpectrumConfigAppConfigDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, originDirect: S.optional( S.NullOr( AppsCreateResultSpectrumConfigPaygoAppConfigOriginDirectList, ).pipe(T.Body("origin_direct")), ), }), ).annotate({ identifier: "AppsCreateResultSpectrumConfigPaygoAppConfig", }) as any as S.Schema; export type AppsCreateResult = | AppsCreateResultSpectrumConfigAppConfig | AppsCreateResultSpectrumConfigPaygoAppConfig; export const AppsCreateResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "createdOn", "dns", "modifiedOn", "protocol", "trafficType", "argoSmartRouting", "edgeIps", "ipFirewall", "originDirect", "originDns", "originPort", "proxyProtocol", "tls", "virtualNetworkId", ], ["id", "createdOn", "dns", "modifiedOn", "protocol", "originDirect"], ]), ); export type CreateAppResponse = AppsCreateResult; export const CreateAppResponse = /*@__PURE__*/ S.suspend(() => AppsCreateResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "CreateAppResponse", }) as any as S.Schema; export interface DeleteAppRequest { /** Zone identifier. */ zoneId: string; /** App identifier. */ appId: string; } export const DeleteAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), appId: S.String.pipe(T.Label("app_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/spectrum/apps/{app_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAppRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteAppResponse { /** Identifier. */ id: string; } export const DeleteAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAppResponse", }) as any as S.Schema; export interface GetAnalyticAggregateCurrentRequest { /** Identifier. */ zoneId: string; /** Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match. */ appID?: string; /** Co-location identifier. */ coloName?: string; } export const GetAnalyticAggregateCurrentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), appID: S.optional(S.String.pipe(T.Query())), coloName: S.optional(S.String.pipe(T.Query("colo_name"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/spectrum/analytics/aggregate/current", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAnalyticAggregateCurrentRequest", }) as any as S.Schema; export interface AnalyticsAggregatesCurrentsGetResultItem { /** Application identifier. */ appID: string; /** Number of bytes sent. */ bytesEgress: number; /** Number of bytes received. */ bytesIngress: number; /** Number of connections. */ connections: number; /** Average duration of connections. */ durationAvg: number; } export const AnalyticsAggregatesCurrentsGetResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ appID: S.String, bytesEgress: S.Number, bytesIngress: S.Number, connections: S.Number, durationAvg: S.Number, }), ).annotate({ identifier: "AnalyticsAggregatesCurrentsGetResultItem", }) as any as S.Schema; export type AnalyticsAggregatesCurrentsGetResultList = Array; export const AnalyticsAggregatesCurrentsGetResultList = /*@__PURE__*/ S.Array( AnalyticsAggregatesCurrentsGetResultItem, ) as any as S.Schema; export type GetAnalyticAggregateCurrentResponse = AnalyticsAggregatesCurrentsGetResultList; export const GetAnalyticAggregateCurrentResponse = /*@__PURE__*/ S.suspend(() => AnalyticsAggregatesCurrentsGetResultList.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetAnalyticAggregateCurrentResponse", }) as any as S.Schema; export type AnalyticsEventsBytimesGetRequestTimeDelta = | "year" | "quarter" | "month" | "week" | "day" | "hour" | "dekaminute" | "minute"; export const AnalyticsEventsBytimesGetRequestTimeDelta = /*@__PURE__*/ S.String; export type AnalyticsEventsBytimesGetRequestDimensionsList = Array; export const AnalyticsEventsBytimesGetRequestDimensionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AnalyticsEventsBytimesGetRequestMetrics = | "count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th"; export const AnalyticsEventsBytimesGetRequestMetrics = /*@__PURE__*/ S.String; export type AnalyticsEventsBytimesGetRequestMetricsList = Array< AnalyticsEventsBytimesGetRequestMetrics | (string & {}) >; export const AnalyticsEventsBytimesGetRequestMetricsList = /*@__PURE__*/ S.Array( AnalyticsEventsBytimesGetRequestMetrics, ) as any as S.Schema; export type AnalyticsEventsBytimesGetRequestSortList = Array; export const AnalyticsEventsBytimesGetRequestSortList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetAnalyticEventBytimeRequest { /** Identifier. */ zoneId: string; /** Used to select time series resolution. */ timeDelta: AnalyticsEventsBytimesGetRequestTimeDelta | (string & {}); /** Can be used to break down the data by given attributes. Options are: */ dimensions?: AnalyticsEventsBytimesGetRequestDimensionsList; /** Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are: */ filters?: string; /** One or more metrics to compute. Options are: */ metrics?: AnalyticsEventsBytimesGetRequestMetricsList; /** Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ since?: string; /** The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */ sort?: AnalyticsEventsBytimesGetRequestSortList; /** End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ until?: string; } export const GetAnalyticEventBytimeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), timeDelta: AnalyticsEventsBytimesGetRequestTimeDelta.pipe( T.Query("time_delta"), ), dimensions: S.optional( AnalyticsEventsBytimesGetRequestDimensionsList.pipe(T.Query()), ), filters: S.optional(S.String.pipe(T.Query())), metrics: S.optional( AnalyticsEventsBytimesGetRequestMetricsList.pipe(T.Query()), ), since: S.optional(S.String.pipe(T.Query())), sort: S.optional(AnalyticsEventsBytimesGetRequestSortList.pipe(T.Query())), until: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/spectrum/analytics/events/bytime", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAnalyticEventBytimeRequest", }) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseDataItemDimensionsList = Array; export const AnalyticsEventsBytimesGetResponseDataItemDimensionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseDataItemMetricsCase0List = Array; export const AnalyticsEventsBytimesGetResponseDataItemMetricsCase0List = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseDataItemMetricsCase1ItemList = Array; export const AnalyticsEventsBytimesGetResponseDataItemMetricsCase1ItemList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseDataItemMetricsCase1List = Array; export const AnalyticsEventsBytimesGetResponseDataItemMetricsCase1List = /*@__PURE__*/ S.Array( AnalyticsEventsBytimesGetResponseDataItemMetricsCase1ItemList, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseDataItemMetrics = | AnalyticsEventsBytimesGetResponseDataItemMetricsCase0List | AnalyticsEventsBytimesGetResponseDataItemMetricsCase1List; export const AnalyticsEventsBytimesGetResponseDataItemMetrics = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []])); export interface AnalyticsEventsBytimesGetResponseDataItem { dimensions?: AnalyticsEventsBytimesGetResponseDataItemDimensionsList | null; metrics?: AnalyticsEventsBytimesGetResponseDataItemMetrics | null; } export const AnalyticsEventsBytimesGetResponseDataItem = /*@__PURE__*/ S.suspend(() => S.Struct({ dimensions: S.optional( S.NullOr(AnalyticsEventsBytimesGetResponseDataItemDimensionsList), ), metrics: S.optional( S.NullOr(AnalyticsEventsBytimesGetResponseDataItemMetrics), ), }), ).annotate({ identifier: "AnalyticsEventsBytimesGetResponseDataItem", }) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseDataList = Array; export const AnalyticsEventsBytimesGetResponseDataList = /*@__PURE__*/ S.Array( AnalyticsEventsBytimesGetResponseDataItem, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseMaxMap = { [key: string]: number | undefined; }; export const AnalyticsEventsBytimesGetResponseMaxMap = /*@__PURE__*/ S.Record( S.String, S.Number, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseMinMap = { [key: string]: number | undefined; }; export const AnalyticsEventsBytimesGetResponseMinMap = /*@__PURE__*/ S.Record( S.String, S.Number, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseQueryDimensionsItem = | "event" | "appID" | "coloName" | "ipVersion"; export const AnalyticsEventsBytimesGetResponseQueryDimensionsItem = /*@__PURE__*/ S.String; export type AnalyticsEventsBytimesGetResponseQueryDimensionsList = Array; export const AnalyticsEventsBytimesGetResponseQueryDimensionsList = /*@__PURE__*/ S.Array( AnalyticsEventsBytimesGetResponseQueryDimensionsItem, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseQueryMetricsItem = | "count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th"; export const AnalyticsEventsBytimesGetResponseQueryMetricsItem = /*@__PURE__*/ S.String; export type AnalyticsEventsBytimesGetResponseQueryMetricsList = Array; export const AnalyticsEventsBytimesGetResponseQueryMetricsList = /*@__PURE__*/ S.Array( AnalyticsEventsBytimesGetResponseQueryMetricsItem, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseQuerySortList = Array; export const AnalyticsEventsBytimesGetResponseQuerySortList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AnalyticsEventsBytimesGetResponseQuery { /** Can be used to break down the data by given attributes. Options are: */ dimensions?: AnalyticsEventsBytimesGetResponseQueryDimensionsList | null; /** Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are: */ filters?: string | null; /** Limit number of returned metrics. */ limit?: number | null; /** One or more metrics to compute. Options are: */ metrics?: AnalyticsEventsBytimesGetResponseQueryMetricsList | null; /** Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ since?: string | null; /** The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */ sort?: AnalyticsEventsBytimesGetResponseQuerySortList | null; /** End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ until?: string | null; } export const AnalyticsEventsBytimesGetResponseQuery = /*@__PURE__*/ S.suspend( () => S.Struct({ dimensions: S.optional( S.NullOr(AnalyticsEventsBytimesGetResponseQueryDimensionsList), ), filters: S.optional(S.NullOr(S.String)), limit: S.optional(S.NullOr(S.Number)), metrics: S.optional( S.NullOr(AnalyticsEventsBytimesGetResponseQueryMetricsList), ), since: S.optional(S.NullOr(S.String)), sort: S.optional( S.NullOr(AnalyticsEventsBytimesGetResponseQuerySortList), ), until: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AnalyticsEventsBytimesGetResponseQuery", }) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseTotalsMap = { [key: string]: number | undefined; }; export const AnalyticsEventsBytimesGetResponseTotalsMap = /*@__PURE__*/ S.Record( S.String, S.Number, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseTimeIntervalsItemList = Array; export const AnalyticsEventsBytimesGetResponseTimeIntervalsItemList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AnalyticsEventsBytimesGetResponseTimeIntervalsList = Array; export const AnalyticsEventsBytimesGetResponseTimeIntervalsList = /*@__PURE__*/ S.Array( AnalyticsEventsBytimesGetResponseTimeIntervalsItemList, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAnalyticEventBytimeResponse { /** List of columns returned by the analytics query. */ data: AnalyticsEventsBytimesGetResponseDataList; /** Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. */ dataLag: number; /** Maximum result for each selected metrics across all data. */ max: AnalyticsEventsBytimesGetResponseMaxMap; /** Minimum result for each selected metrics across all data. */ min: AnalyticsEventsBytimesGetResponseMinMap; query: AnalyticsEventsBytimesGetResponseQuery; /** Total number of rows in the result. */ rows: number; /** Total result for each selected metrics across all data. */ totals: AnalyticsEventsBytimesGetResponseTotalsMap; /** List of time interval buckets: [start, end]. */ timeIntervals?: AnalyticsEventsBytimesGetResponseTimeIntervalsList | null; } export const GetAnalyticEventBytimeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ data: AnalyticsEventsBytimesGetResponseDataList, dataLag: S.Number.pipe(T.Body("data_lag")), max: AnalyticsEventsBytimesGetResponseMaxMap, min: AnalyticsEventsBytimesGetResponseMinMap, query: AnalyticsEventsBytimesGetResponseQuery, rows: S.Number, totals: AnalyticsEventsBytimesGetResponseTotalsMap, timeIntervals: S.optional( S.NullOr(AnalyticsEventsBytimesGetResponseTimeIntervalsList).pipe( T.Body("time_intervals"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAnalyticEventBytimeResponse", }) as any as S.Schema; export type AnalyticsEventsSummariesGetRequestDimensionsList = Array; export const AnalyticsEventsSummariesGetRequestDimensionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AnalyticsEventsSummariesGetRequestMetrics = | "count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th"; export const AnalyticsEventsSummariesGetRequestMetrics = /*@__PURE__*/ S.String; export type AnalyticsEventsSummariesGetRequestMetricsList = Array< AnalyticsEventsSummariesGetRequestMetrics | (string & {}) >; export const AnalyticsEventsSummariesGetRequestMetricsList = /*@__PURE__*/ S.Array( AnalyticsEventsSummariesGetRequestMetrics, ) as any as S.Schema; export type AnalyticsEventsSummariesGetRequestSortList = Array; export const AnalyticsEventsSummariesGetRequestSortList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface GetAnalyticEventSummaryRequest { /** Identifier. */ zoneId: string; /** Can be used to break down the data by given attributes. Options are: */ dimensions?: AnalyticsEventsSummariesGetRequestDimensionsList; /** Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are: */ filters?: string; /** One or more metrics to compute. Options are: */ metrics?: AnalyticsEventsSummariesGetRequestMetricsList; /** Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ since?: string; /** The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */ sort?: AnalyticsEventsSummariesGetRequestSortList; /** End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ until?: string; } export const GetAnalyticEventSummaryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), dimensions: S.optional( AnalyticsEventsSummariesGetRequestDimensionsList.pipe(T.Query()), ), filters: S.optional(S.String.pipe(T.Query())), metrics: S.optional( AnalyticsEventsSummariesGetRequestMetricsList.pipe(T.Query()), ), since: S.optional(S.String.pipe(T.Query())), sort: S.optional( AnalyticsEventsSummariesGetRequestSortList.pipe(T.Query()), ), until: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/spectrum/analytics/events/summary", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAnalyticEventSummaryRequest", }) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseDataItemDimensionsList = Array; export const AnalyticsEventsSummariesGetResponseDataItemDimensionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseDataItemMetricsCase0List = Array; export const AnalyticsEventsSummariesGetResponseDataItemMetricsCase0List = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseDataItemMetricsCase1ItemList = Array; export const AnalyticsEventsSummariesGetResponseDataItemMetricsCase1ItemList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseDataItemMetricsCase1List = Array; export const AnalyticsEventsSummariesGetResponseDataItemMetricsCase1List = /*@__PURE__*/ S.Array( AnalyticsEventsSummariesGetResponseDataItemMetricsCase1ItemList, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseDataItemMetrics = | AnalyticsEventsSummariesGetResponseDataItemMetricsCase0List | AnalyticsEventsSummariesGetResponseDataItemMetricsCase1List; export const AnalyticsEventsSummariesGetResponseDataItemMetrics = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []])); export interface AnalyticsEventsSummariesGetResponseDataItem { dimensions?: AnalyticsEventsSummariesGetResponseDataItemDimensionsList | null; metrics?: AnalyticsEventsSummariesGetResponseDataItemMetrics | null; } export const AnalyticsEventsSummariesGetResponseDataItem = /*@__PURE__*/ S.suspend(() => S.Struct({ dimensions: S.optional( S.NullOr(AnalyticsEventsSummariesGetResponseDataItemDimensionsList), ), metrics: S.optional( S.NullOr(AnalyticsEventsSummariesGetResponseDataItemMetrics), ), }), ).annotate({ identifier: "AnalyticsEventsSummariesGetResponseDataItem", }) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseDataList = Array; export const AnalyticsEventsSummariesGetResponseDataList = /*@__PURE__*/ S.Array( AnalyticsEventsSummariesGetResponseDataItem, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseMaxMap = { [key: string]: number | undefined; }; export const AnalyticsEventsSummariesGetResponseMaxMap = /*@__PURE__*/ S.Record( S.String, S.Number, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseMinMap = { [key: string]: number | undefined; }; export const AnalyticsEventsSummariesGetResponseMinMap = /*@__PURE__*/ S.Record( S.String, S.Number, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseQueryDimensionsItem = | "event" | "appID" | "coloName" | "ipVersion"; export const AnalyticsEventsSummariesGetResponseQueryDimensionsItem = /*@__PURE__*/ S.String; export type AnalyticsEventsSummariesGetResponseQueryDimensionsList = Array; export const AnalyticsEventsSummariesGetResponseQueryDimensionsList = /*@__PURE__*/ S.Array( AnalyticsEventsSummariesGetResponseQueryDimensionsItem, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseQueryMetricsItem = | "count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th"; export const AnalyticsEventsSummariesGetResponseQueryMetricsItem = /*@__PURE__*/ S.String; export type AnalyticsEventsSummariesGetResponseQueryMetricsList = Array; export const AnalyticsEventsSummariesGetResponseQueryMetricsList = /*@__PURE__*/ S.Array( AnalyticsEventsSummariesGetResponseQueryMetricsItem, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseQuerySortList = Array; export const AnalyticsEventsSummariesGetResponseQuerySortList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AnalyticsEventsSummariesGetResponseQuery { /** Can be used to break down the data by given attributes. Options are: */ dimensions?: AnalyticsEventsSummariesGetResponseQueryDimensionsList | null; /** Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are: */ filters?: string | null; /** Limit number of returned metrics. */ limit?: number | null; /** One or more metrics to compute. Options are: */ metrics?: AnalyticsEventsSummariesGetResponseQueryMetricsList | null; /** Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ since?: string | null; /** The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */ sort?: AnalyticsEventsSummariesGetResponseQuerySortList | null; /** End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */ until?: string | null; } export const AnalyticsEventsSummariesGetResponseQuery = /*@__PURE__*/ S.suspend( () => S.Struct({ dimensions: S.optional( S.NullOr(AnalyticsEventsSummariesGetResponseQueryDimensionsList), ), filters: S.optional(S.NullOr(S.String)), limit: S.optional(S.NullOr(S.Number)), metrics: S.optional( S.NullOr(AnalyticsEventsSummariesGetResponseQueryMetricsList), ), since: S.optional(S.NullOr(S.String)), sort: S.optional( S.NullOr(AnalyticsEventsSummariesGetResponseQuerySortList), ), until: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AnalyticsEventsSummariesGetResponseQuery", }) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseTotalsMap = { [key: string]: number | undefined; }; export const AnalyticsEventsSummariesGetResponseTotalsMap = /*@__PURE__*/ S.Record( S.String, S.Number, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseTimeIntervalsItemList = Array; export const AnalyticsEventsSummariesGetResponseTimeIntervalsItemList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AnalyticsEventsSummariesGetResponseTimeIntervalsList = Array; export const AnalyticsEventsSummariesGetResponseTimeIntervalsList = /*@__PURE__*/ S.Array( AnalyticsEventsSummariesGetResponseTimeIntervalsItemList, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAnalyticEventSummaryResponse { /** List of columns returned by the analytics query. */ data: AnalyticsEventsSummariesGetResponseDataList; /** Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. */ dataLag: number; /** Maximum result for each selected metrics across all data. */ max: AnalyticsEventsSummariesGetResponseMaxMap; /** Minimum result for each selected metrics across all data. */ min: AnalyticsEventsSummariesGetResponseMinMap; query: AnalyticsEventsSummariesGetResponseQuery; /** Total number of rows in the result. */ rows: number; /** Total result for each selected metrics across all data. */ totals: AnalyticsEventsSummariesGetResponseTotalsMap; /** List of time interval buckets: [start, end]. */ timeIntervals?: AnalyticsEventsSummariesGetResponseTimeIntervalsList | null; } export const GetAnalyticEventSummaryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ data: AnalyticsEventsSummariesGetResponseDataList, dataLag: S.Number.pipe(T.Body("data_lag")), max: AnalyticsEventsSummariesGetResponseMaxMap, min: AnalyticsEventsSummariesGetResponseMinMap, query: AnalyticsEventsSummariesGetResponseQuery, rows: S.Number, totals: AnalyticsEventsSummariesGetResponseTotalsMap, timeIntervals: S.optional( S.NullOr(AnalyticsEventsSummariesGetResponseTimeIntervalsList).pipe( T.Body("time_intervals"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAnalyticEventSummaryResponse", }) as any as S.Schema; export interface GetAppRequest { /** Zone identifier. */ zoneId: string; /** App identifier. */ appId: string; } export const GetAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), appId: S.String.pipe(T.Label("app_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/spectrum/apps/{app_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAppRequest" }) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigDnsType = "CNAME" | "ADDRESS"; export const AppsGetResultSpectrumConfigAppConfigDnsType = /*@__PURE__*/ S.String; export interface AppsGetResultSpectrumConfigAppConfigDns { /** The name of the DNS record associated with the application. */ name?: string | null; /** The type of DNS record associated with the application. */ type?: AppsGetResultSpectrumConfigAppConfigDnsType | null; } export const AppsGetResultSpectrumConfigAppConfigDns = /*@__PURE__*/ S.suspend( () => S.Struct({ name: S.optional(S.NullOr(S.String)), type: S.optional(S.NullOr(AppsGetResultSpectrumConfigAppConfigDnsType)), }), ).annotate({ identifier: "AppsGetResultSpectrumConfigAppConfigDns", }) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigTrafficType = | "direct" | "http" | "https"; export const AppsGetResultSpectrumConfigAppConfigTrafficType = /*@__PURE__*/ S.String; export type AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity = | "all" | "ipv4" | "ipv6"; export const AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity = /*@__PURE__*/ S.String; export type AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicType = "dynamic"; export const AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicType = /*@__PURE__*/ S.String; export interface AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamic { /** The IP versions supported for inbound connections on Spectrum anycast IPs. */ connectivity?: AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity | null; /** The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. */ type?: AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicType | null; } export const AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamic = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivity: S.optional( S.NullOr( AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity, ), ), type: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamicType), ), }), ).annotate({ identifier: "AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamic", }) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticIpsList = Array; export const AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticType = "static"; export const AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticType = /*@__PURE__*/ S.String; export interface AppsGetResultSpectrumConfigAppConfigEdgeIpsStatic { /** The array of customer owned IPs we broadcast via anycast for this hostname and application. */ ips?: AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticIpsList | null; /** The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names. */ type?: AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticType | null; } export const AppsGetResultSpectrumConfigAppConfigEdgeIpsStatic = /*@__PURE__*/ S.suspend(() => S.Struct({ ips: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticIpsList), ), type: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigEdgeIpsStaticType), ), }), ).annotate({ identifier: "AppsGetResultSpectrumConfigAppConfigEdgeIpsStatic", }) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigEdgeIps = | AppsGetResultSpectrumConfigAppConfigEdgeIpsDynamic | AppsGetResultSpectrumConfigAppConfigEdgeIpsStatic; export const AppsGetResultSpectrumConfigAppConfigEdgeIps = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["connectivity", "type"], ["ips", "type"], ]), ); export type AppsGetResultSpectrumConfigAppConfigOriginDirectList = Array; export const AppsGetResultSpectrumConfigAppConfigOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigOriginDnsType = | "" | "A" | "AAAA" | "SRV"; export const AppsGetResultSpectrumConfigAppConfigOriginDnsType = /*@__PURE__*/ S.String; export interface AppsGetResultSpectrumConfigAppConfigOriginDns { /** The name of the DNS record associated with the origin. */ name?: string | null; /** The TTL of our resolution of your DNS record in seconds. */ ttl?: number | null; /** The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. */ type?: AppsGetResultSpectrumConfigAppConfigOriginDnsType | null; } export const AppsGetResultSpectrumConfigAppConfigOriginDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), ttl: S.optional(S.NullOr(S.Number)), type: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigOriginDnsType), ), }), ).annotate({ identifier: "AppsGetResultSpectrumConfigAppConfigOriginDns", }) as any as S.Schema; export type AppsGetResultSpectrumConfigAppConfigOriginPort = string | number; export const AppsGetResultSpectrumConfigAppConfigOriginPort = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []])); export type AppsGetResultSpectrumConfigAppConfigProxyProtocol = | "off" | "v1" | "v2" | "simple"; export const AppsGetResultSpectrumConfigAppConfigProxyProtocol = /*@__PURE__*/ S.String; export type AppsGetResultSpectrumConfigAppConfigTls = | "off" | "flexible" | "full" | "strict"; export const AppsGetResultSpectrumConfigAppConfigTls = /*@__PURE__*/ S.String; export interface AppsGetResultSpectrumConfigAppConfig { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsGetResultSpectrumConfigAppConfigDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. */ trafficType: AppsGetResultSpectrumConfigAppConfigTrafficType; /** Enables Argo Smart Routing for this application. */ argoSmartRouting?: boolean | null; /** The anycast edge IP configuration for the hostname of this application. */ edgeIps?: AppsGetResultSpectrumConfigAppConfigEdgeIps | null; /** Enables IP Access Rules for this application. */ ipFirewall?: boolean | null; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsGetResultSpectrumConfigAppConfigOriginDirectList | null; /** The name and type of DNS record for the Spectrum application. */ originDns?: AppsGetResultSpectrumConfigAppConfigOriginDns | null; /** The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. */ originPort?: AppsGetResultSpectrumConfigAppConfigOriginPort | null; /** Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. */ proxyProtocol?: AppsGetResultSpectrumConfigAppConfigProxyProtocol | null; /** The type of TLS termination associated with the application. */ tls?: AppsGetResultSpectrumConfigAppConfigTls | null; /** Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks. */ virtualNetworkId?: string | null; } export const AppsGetResultSpectrumConfigAppConfig = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsGetResultSpectrumConfigAppConfigDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, trafficType: AppsGetResultSpectrumConfigAppConfigTrafficType.pipe( T.Body("traffic_type"), ), argoSmartRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("argo_smart_routing")), ), edgeIps: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigEdgeIps).pipe( T.Body("edge_ips"), ), ), ipFirewall: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ip_firewall"))), originDirect: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigOriginDirectList).pipe( T.Body("origin_direct"), ), ), originDns: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigOriginDns).pipe( T.Body("origin_dns"), ), ), originPort: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigOriginPort).pipe( T.Body("origin_port"), ), ), proxyProtocol: S.optional( S.NullOr(AppsGetResultSpectrumConfigAppConfigProxyProtocol).pipe( T.Body("proxy_protocol"), ), ), tls: S.optional(S.NullOr(AppsGetResultSpectrumConfigAppConfigTls)), virtualNetworkId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_network_id")), ), }), ).annotate({ identifier: "AppsGetResultSpectrumConfigAppConfig", }) as any as S.Schema; export type AppsGetResultSpectrumConfigPaygoAppConfigOriginDirectList = Array; export const AppsGetResultSpectrumConfigPaygoAppConfigOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AppsGetResultSpectrumConfigPaygoAppConfig { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsGetResultSpectrumConfigAppConfigDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsGetResultSpectrumConfigPaygoAppConfigOriginDirectList | null; } export const AppsGetResultSpectrumConfigPaygoAppConfig = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsGetResultSpectrumConfigAppConfigDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, originDirect: S.optional( S.NullOr( AppsGetResultSpectrumConfigPaygoAppConfigOriginDirectList, ).pipe(T.Body("origin_direct")), ), }), ).annotate({ identifier: "AppsGetResultSpectrumConfigPaygoAppConfig", }) as any as S.Schema; export type AppsGetResult = | AppsGetResultSpectrumConfigAppConfig | AppsGetResultSpectrumConfigPaygoAppConfig; export const AppsGetResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "createdOn", "dns", "modifiedOn", "protocol", "trafficType", "argoSmartRouting", "edgeIps", "ipFirewall", "originDirect", "originDns", "originPort", "proxyProtocol", "tls", "virtualNetworkId", ], ["id", "createdOn", "dns", "modifiedOn", "protocol", "originDirect"], ]), ); export type GetAppResponse = AppsGetResult; export const GetAppResponse = /*@__PURE__*/ S.suspend(() => AppsGetResult.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAppResponse" }) as any as S.Schema; export type AppsListRequestDirection = "asc" | "desc"; export const AppsListRequestDirection = /*@__PURE__*/ S.String; export type AppsListRequestOrder = | "protocol" | "app_id" | "created_on" | "modified_on" | "dns"; export const AppsListRequestOrder = /*@__PURE__*/ S.String; export interface ListAppsRequest { /** Zone identifier. */ zoneId: string; /** Sets the direction by which results are ordered. */ direction?: AppsListRequestDirection | (string & {}); /** Application field by which results are ordered. */ order?: AppsListRequestOrder | (string & {}); /** Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response. */ page?: number; /** Sets the maximum number of results per page. */ perPage?: number; } export const ListAppsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), direction: S.optional(AppsListRequestDirection.pipe(T.Query())), order: S.optional(AppsListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/spectrum/apps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAppsRequest", }) as any as S.Schema; export type AppsListResultCase0ItemDnsType = "CNAME" | "ADDRESS"; export const AppsListResultCase0ItemDnsType = /*@__PURE__*/ S.String; export interface AppsListResultCase0ItemDns { /** The name of the DNS record associated with the application. */ name?: string | null; /** The type of DNS record associated with the application. */ type?: AppsListResultCase0ItemDnsType | null; } export const AppsListResultCase0ItemDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), type: S.optional(S.NullOr(AppsListResultCase0ItemDnsType)), }), ).annotate({ identifier: "AppsListResultCase0ItemDns", }) as any as S.Schema; export type AppsListResultCase0ItemTrafficType = "direct" | "http" | "https"; export const AppsListResultCase0ItemTrafficType = /*@__PURE__*/ S.String; export type AppsListResultCase0ItemEdgeIpsDynamicConnectivity = | "all" | "ipv4" | "ipv6"; export const AppsListResultCase0ItemEdgeIpsDynamicConnectivity = /*@__PURE__*/ S.String; export type AppsListResultCase0ItemEdgeIpsDynamicType = "dynamic"; export const AppsListResultCase0ItemEdgeIpsDynamicType = /*@__PURE__*/ S.String; export interface AppsListResultCase0ItemEdgeIpsDynamic { /** The IP versions supported for inbound connections on Spectrum anycast IPs. */ connectivity?: AppsListResultCase0ItemEdgeIpsDynamicConnectivity | null; /** The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. */ type?: AppsListResultCase0ItemEdgeIpsDynamicType | null; } export const AppsListResultCase0ItemEdgeIpsDynamic = /*@__PURE__*/ S.suspend( () => S.Struct({ connectivity: S.optional( S.NullOr(AppsListResultCase0ItemEdgeIpsDynamicConnectivity), ), type: S.optional(S.NullOr(AppsListResultCase0ItemEdgeIpsDynamicType)), }), ).annotate({ identifier: "AppsListResultCase0ItemEdgeIpsDynamic", }) as any as S.Schema; export type AppsListResultCase0ItemEdgeIpsStaticIpsList = Array; export const AppsListResultCase0ItemEdgeIpsStaticIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsListResultCase0ItemEdgeIpsStaticType = "static"; export const AppsListResultCase0ItemEdgeIpsStaticType = /*@__PURE__*/ S.String; export interface AppsListResultCase0ItemEdgeIpsStatic { /** The array of customer owned IPs we broadcast via anycast for this hostname and application. */ ips?: AppsListResultCase0ItemEdgeIpsStaticIpsList | null; /** The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names. */ type?: AppsListResultCase0ItemEdgeIpsStaticType | null; } export const AppsListResultCase0ItemEdgeIpsStatic = /*@__PURE__*/ S.suspend( () => S.Struct({ ips: S.optional(S.NullOr(AppsListResultCase0ItemEdgeIpsStaticIpsList)), type: S.optional(S.NullOr(AppsListResultCase0ItemEdgeIpsStaticType)), }), ).annotate({ identifier: "AppsListResultCase0ItemEdgeIpsStatic", }) as any as S.Schema; export type AppsListResultCase0ItemEdgeIps = | AppsListResultCase0ItemEdgeIpsDynamic | AppsListResultCase0ItemEdgeIpsStatic; export const AppsListResultCase0ItemEdgeIps = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["connectivity", "type"], ["ips", "type"], ]), ); export type AppsListResultCase0ItemOriginDirectList = Array; export const AppsListResultCase0ItemOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsListResultCase0ItemOriginDnsType = "" | "A" | "AAAA" | "SRV"; export const AppsListResultCase0ItemOriginDnsType = /*@__PURE__*/ S.String; export interface AppsListResultCase0ItemOriginDns { /** The name of the DNS record associated with the origin. */ name?: string | null; /** The TTL of our resolution of your DNS record in seconds. */ ttl?: number | null; /** The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. */ type?: AppsListResultCase0ItemOriginDnsType | null; } export const AppsListResultCase0ItemOriginDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), ttl: S.optional(S.NullOr(S.Number)), type: S.optional(S.NullOr(AppsListResultCase0ItemOriginDnsType)), }), ).annotate({ identifier: "AppsListResultCase0ItemOriginDns", }) as any as S.Schema; export type AppsListResultCase0ItemOriginPort = string | number; export const AppsListResultCase0ItemOriginPort = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], []]), ); export type AppsListResultCase0ItemProxyProtocol = | "off" | "v1" | "v2" | "simple"; export const AppsListResultCase0ItemProxyProtocol = /*@__PURE__*/ S.String; export type AppsListResultCase0ItemTls = "off" | "flexible" | "full" | "strict"; export const AppsListResultCase0ItemTls = /*@__PURE__*/ S.String; export interface AppsListResultCase0Item { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsListResultCase0ItemDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. */ trafficType: AppsListResultCase0ItemTrafficType; /** Enables Argo Smart Routing for this application. */ argoSmartRouting?: boolean | null; /** The anycast edge IP configuration for the hostname of this application. */ edgeIps?: AppsListResultCase0ItemEdgeIps | null; /** Enables IP Access Rules for this application. */ ipFirewall?: boolean | null; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsListResultCase0ItemOriginDirectList | null; /** The name and type of DNS record for the Spectrum application. */ originDns?: AppsListResultCase0ItemOriginDns | null; /** The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. */ originPort?: AppsListResultCase0ItemOriginPort | null; /** Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. */ proxyProtocol?: AppsListResultCase0ItemProxyProtocol | null; /** The type of TLS termination associated with the application. */ tls?: AppsListResultCase0ItemTls | null; /** Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks. */ virtualNetworkId?: string | null; } export const AppsListResultCase0Item = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsListResultCase0ItemDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, trafficType: AppsListResultCase0ItemTrafficType.pipe( T.Body("traffic_type"), ), argoSmartRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("argo_smart_routing")), ), edgeIps: S.optional( S.NullOr(AppsListResultCase0ItemEdgeIps).pipe(T.Body("edge_ips")), ), ipFirewall: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ip_firewall"))), originDirect: S.optional( S.NullOr(AppsListResultCase0ItemOriginDirectList).pipe( T.Body("origin_direct"), ), ), originDns: S.optional( S.NullOr(AppsListResultCase0ItemOriginDns).pipe(T.Body("origin_dns")), ), originPort: S.optional( S.NullOr(AppsListResultCase0ItemOriginPort).pipe(T.Body("origin_port")), ), proxyProtocol: S.optional( S.NullOr(AppsListResultCase0ItemProxyProtocol).pipe( T.Body("proxy_protocol"), ), ), tls: S.optional(S.NullOr(AppsListResultCase0ItemTls)), virtualNetworkId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_network_id")), ), }), ).annotate({ identifier: "AppsListResultCase0Item", }) as any as S.Schema; export type AppsListResultCase0List = Array; export const AppsListResultCase0List = /*@__PURE__*/ S.Array( AppsListResultCase0Item, ) as any as S.Schema; export type AppsListResultCase1ItemOriginDirectList = Array; export const AppsListResultCase1ItemOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AppsListResultCase1Item { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsListResultCase0ItemDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsListResultCase1ItemOriginDirectList | null; } export const AppsListResultCase1Item = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsListResultCase0ItemDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, originDirect: S.optional( S.NullOr(AppsListResultCase1ItemOriginDirectList).pipe( T.Body("origin_direct"), ), ), }), ).annotate({ identifier: "AppsListResultCase1Item", }) as any as S.Schema; export type AppsListResultCase1List = Array; export const AppsListResultCase1List = /*@__PURE__*/ S.Array( AppsListResultCase1Item, ) as any as S.Schema; export type AppsListResult = AppsListResultCase0List | AppsListResultCase1List; export const AppsListResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], []]), ); export interface ListAppsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AppsListResult; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAppsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AppsListResult.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 type AppsUpdateRequestDnsSpectrumConfigAppConfigType = | "CNAME" | "ADDRESS"; export const AppsUpdateRequestDnsSpectrumConfigAppConfigType = /*@__PURE__*/ S.String; export interface AppsUpdateRequestDnsSpectrumConfigAppConfig { /** The name of the DNS record associated with the application. */ name?: string; /** The type of DNS record associated with the application. */ type?: AppsUpdateRequestDnsSpectrumConfigAppConfigType | (string & {}); } export const AppsUpdateRequestDnsSpectrumConfigAppConfig = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.String), type: S.optional(AppsUpdateRequestDnsSpectrumConfigAppConfigType), }), ).annotate({ identifier: "AppsUpdateRequestDnsSpectrumConfigAppConfig", }) as any as S.Schema; export type AppsUpdateRequestTrafficType = "direct" | "http" | "https"; export const AppsUpdateRequestTrafficType = /*@__PURE__*/ S.String; export type AppsUpdateRequestEdgeIpsDynamicConnectivity = | "all" | "ipv4" | "ipv6"; export const AppsUpdateRequestEdgeIpsDynamicConnectivity = /*@__PURE__*/ S.String; export type AppsUpdateRequestEdgeIpsDynamicType = "dynamic"; export const AppsUpdateRequestEdgeIpsDynamicType = /*@__PURE__*/ S.String; export interface AppsUpdateRequestEdgeIpsDynamic { /** The IP versions supported for inbound connections on Spectrum anycast IPs. */ connectivity?: AppsUpdateRequestEdgeIpsDynamicConnectivity | (string & {}); /** The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. */ type?: AppsUpdateRequestEdgeIpsDynamicType | (string & {}); } export const AppsUpdateRequestEdgeIpsDynamic = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivity: S.optional(AppsUpdateRequestEdgeIpsDynamicConnectivity), type: S.optional(AppsUpdateRequestEdgeIpsDynamicType), }), ).annotate({ identifier: "AppsUpdateRequestEdgeIpsDynamic", }) as any as S.Schema; export type AppsUpdateRequestEdgeIpsStaticIpsList = Array; export const AppsUpdateRequestEdgeIpsStaticIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateRequestEdgeIpsStaticType = "static"; export const AppsUpdateRequestEdgeIpsStaticType = /*@__PURE__*/ S.String; export interface AppsUpdateRequestEdgeIpsStatic { /** The array of customer owned IPs we broadcast via anycast for this hostname and application. */ ips?: AppsUpdateRequestEdgeIpsStaticIpsList; /** The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names. */ type?: AppsUpdateRequestEdgeIpsStaticType | (string & {}); } export const AppsUpdateRequestEdgeIpsStatic = /*@__PURE__*/ S.suspend(() => S.Struct({ ips: S.optional(AppsUpdateRequestEdgeIpsStaticIpsList), type: S.optional(AppsUpdateRequestEdgeIpsStaticType), }), ).annotate({ identifier: "AppsUpdateRequestEdgeIpsStatic", }) as any as S.Schema; export type AppsUpdateRequestEdgeIps = | AppsUpdateRequestEdgeIpsDynamic | AppsUpdateRequestEdgeIpsStatic; export const AppsUpdateRequestEdgeIps = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["connectivity", "type"], ["ips", "type"], ]), ); export type AppsUpdateRequestOriginDirectList = Array; export const AppsUpdateRequestOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateRequestOriginDnsType = "" | "A" | "AAAA" | "SRV"; export const AppsUpdateRequestOriginDnsType = /*@__PURE__*/ S.String; export interface AppsUpdateRequestOriginDns { /** The name of the DNS record associated with the origin. */ name?: string; /** The TTL of our resolution of your DNS record in seconds. */ ttl?: number; /** The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. */ type?: AppsUpdateRequestOriginDnsType | (string & {}); } export const AppsUpdateRequestOriginDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.String), ttl: S.optional(S.Number), type: S.optional(AppsUpdateRequestOriginDnsType), }), ).annotate({ identifier: "AppsUpdateRequestOriginDns", }) as any as S.Schema; export type AppsUpdateRequestOriginPort = string | number; export const AppsUpdateRequestOriginPort = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], []]), ); export type AppsUpdateRequestProxyProtocol = "off" | "v1" | "v2" | "simple"; export const AppsUpdateRequestProxyProtocol = /*@__PURE__*/ S.String; export type AppsUpdateRequestTls = "off" | "flexible" | "full" | "strict"; export const AppsUpdateRequestTls = /*@__PURE__*/ S.String; export interface UpdateAppRequest { /** Zone identifier. */ zoneId: string; /** App identifier. */ appId: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsUpdateRequestDnsSpectrumConfigAppConfig; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. */ trafficType?: AppsUpdateRequestTrafficType | (string & {}); /** Enables Argo Smart Routing for this application. */ argoSmartRouting?: boolean; /** The anycast edge IP configuration for the hostname of this application. */ edgeIps?: AppsUpdateRequestEdgeIps; /** Enables IP Access Rules for this application. */ ipFirewall?: boolean; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsUpdateRequestOriginDirectList; /** The name and type of DNS record for the Spectrum application. */ originDns?: AppsUpdateRequestOriginDns; /** The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. */ originPort?: AppsUpdateRequestOriginPort; /** Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. */ proxyProtocol?: AppsUpdateRequestProxyProtocol | (string & {}); /** The type of TLS termination associated with the application. */ tls?: AppsUpdateRequestTls | (string & {}); /** Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks. */ virtualNetworkId?: string; } export const UpdateAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), appId: S.String.pipe(T.Label("app_id")), dns: AppsUpdateRequestDnsSpectrumConfigAppConfig, protocol: S.String, trafficType: S.optional( AppsUpdateRequestTrafficType.pipe(T.Body("traffic_type")), ), argoSmartRouting: S.optional(S.Boolean.pipe(T.Body("argo_smart_routing"))), edgeIps: S.optional(AppsUpdateRequestEdgeIps.pipe(T.Body("edge_ips"))), ipFirewall: S.optional(S.Boolean.pipe(T.Body("ip_firewall"))), originDirect: S.optional( AppsUpdateRequestOriginDirectList.pipe(T.Body("origin_direct")), ), originDns: S.optional( AppsUpdateRequestOriginDns.pipe(T.Body("origin_dns")), ), originPort: S.optional( AppsUpdateRequestOriginPort.pipe(T.Body("origin_port")), ), proxyProtocol: S.optional( AppsUpdateRequestProxyProtocol.pipe(T.Body("proxy_protocol")), ), tls: S.optional(AppsUpdateRequestTls), virtualNetworkId: S.optional(S.String.pipe(T.Body("virtual_network_id"))), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/spectrum/apps/{app_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateAppRequest", }) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigDnsType = | "CNAME" | "ADDRESS"; export const AppsUpdateResultSpectrumConfigAppConfigDnsType = /*@__PURE__*/ S.String; export interface AppsUpdateResultSpectrumConfigAppConfigDns { /** The name of the DNS record associated with the application. */ name?: string | null; /** The type of DNS record associated with the application. */ type?: AppsUpdateResultSpectrumConfigAppConfigDnsType | null; } export const AppsUpdateResultSpectrumConfigAppConfigDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), type: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigDnsType), ), }), ).annotate({ identifier: "AppsUpdateResultSpectrumConfigAppConfigDns", }) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigTrafficType = | "direct" | "http" | "https"; export const AppsUpdateResultSpectrumConfigAppConfigTrafficType = /*@__PURE__*/ S.String; export type AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity = | "all" | "ipv4" | "ipv6"; export const AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity = /*@__PURE__*/ S.String; export type AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicType = "dynamic"; export const AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicType = /*@__PURE__*/ S.String; export interface AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamic { /** The IP versions supported for inbound connections on Spectrum anycast IPs. */ connectivity?: AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity | null; /** The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. */ type?: AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicType | null; } export const AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamic = /*@__PURE__*/ S.suspend(() => S.Struct({ connectivity: S.optional( S.NullOr( AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicConnectivity, ), ), type: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamicType), ), }), ).annotate({ identifier: "AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamic", }) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList = Array; export const AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticType = "static"; export const AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticType = /*@__PURE__*/ S.String; export interface AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStatic { /** The array of customer owned IPs we broadcast via anycast for this hostname and application. */ ips?: AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList | null; /** The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names. */ type?: AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticType | null; } export const AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStatic = /*@__PURE__*/ S.suspend(() => S.Struct({ ips: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticIpsList), ), type: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStaticType), ), }), ).annotate({ identifier: "AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStatic", }) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigEdgeIps = | AppsUpdateResultSpectrumConfigAppConfigEdgeIpsDynamic | AppsUpdateResultSpectrumConfigAppConfigEdgeIpsStatic; export const AppsUpdateResultSpectrumConfigAppConfigEdgeIps = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["connectivity", "type"], ["ips", "type"], ]), ); export type AppsUpdateResultSpectrumConfigAppConfigOriginDirectList = Array; export const AppsUpdateResultSpectrumConfigAppConfigOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigOriginDnsType = | "" | "A" | "AAAA" | "SRV"; export const AppsUpdateResultSpectrumConfigAppConfigOriginDnsType = /*@__PURE__*/ S.String; export interface AppsUpdateResultSpectrumConfigAppConfigOriginDns { /** The name of the DNS record associated with the origin. */ name?: string | null; /** The TTL of our resolution of your DNS record in seconds. */ ttl?: number | null; /** The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. */ type?: AppsUpdateResultSpectrumConfigAppConfigOriginDnsType | null; } export const AppsUpdateResultSpectrumConfigAppConfigOriginDns = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), ttl: S.optional(S.NullOr(S.Number)), type: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigOriginDnsType), ), }), ).annotate({ identifier: "AppsUpdateResultSpectrumConfigAppConfigOriginDns", }) as any as S.Schema; export type AppsUpdateResultSpectrumConfigAppConfigOriginPort = string | number; export const AppsUpdateResultSpectrumConfigAppConfigOriginPort = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []])); export type AppsUpdateResultSpectrumConfigAppConfigProxyProtocol = | "off" | "v1" | "v2" | "simple"; export const AppsUpdateResultSpectrumConfigAppConfigProxyProtocol = /*@__PURE__*/ S.String; export type AppsUpdateResultSpectrumConfigAppConfigTls = | "off" | "flexible" | "full" | "strict"; export const AppsUpdateResultSpectrumConfigAppConfigTls = /*@__PURE__*/ S.String; export interface AppsUpdateResultSpectrumConfigAppConfig { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsUpdateResultSpectrumConfigAppConfigDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. */ trafficType: AppsUpdateResultSpectrumConfigAppConfigTrafficType; /** Enables Argo Smart Routing for this application. */ argoSmartRouting?: boolean | null; /** The anycast edge IP configuration for the hostname of this application. */ edgeIps?: AppsUpdateResultSpectrumConfigAppConfigEdgeIps | null; /** Enables IP Access Rules for this application. */ ipFirewall?: boolean | null; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsUpdateResultSpectrumConfigAppConfigOriginDirectList | null; /** The name and type of DNS record for the Spectrum application. */ originDns?: AppsUpdateResultSpectrumConfigAppConfigOriginDns | null; /** The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. */ originPort?: AppsUpdateResultSpectrumConfigAppConfigOriginPort | null; /** Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. */ proxyProtocol?: AppsUpdateResultSpectrumConfigAppConfigProxyProtocol | null; /** The type of TLS termination associated with the application. */ tls?: AppsUpdateResultSpectrumConfigAppConfigTls | null; /** Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks. */ virtualNetworkId?: string | null; } export const AppsUpdateResultSpectrumConfigAppConfig = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsUpdateResultSpectrumConfigAppConfigDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, trafficType: AppsUpdateResultSpectrumConfigAppConfigTrafficType.pipe( T.Body("traffic_type"), ), argoSmartRouting: S.optional( S.NullOr(S.Boolean).pipe(T.Body("argo_smart_routing")), ), edgeIps: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigEdgeIps).pipe( T.Body("edge_ips"), ), ), ipFirewall: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ip_firewall"))), originDirect: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigOriginDirectList).pipe( T.Body("origin_direct"), ), ), originDns: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigOriginDns).pipe( T.Body("origin_dns"), ), ), originPort: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigOriginPort).pipe( T.Body("origin_port"), ), ), proxyProtocol: S.optional( S.NullOr(AppsUpdateResultSpectrumConfigAppConfigProxyProtocol).pipe( T.Body("proxy_protocol"), ), ), tls: S.optional(S.NullOr(AppsUpdateResultSpectrumConfigAppConfigTls)), virtualNetworkId: S.optional( S.NullOr(S.String).pipe(T.Body("virtual_network_id")), ), }), ).annotate({ identifier: "AppsUpdateResultSpectrumConfigAppConfig", }) as any as S.Schema; export type AppsUpdateResultSpectrumConfigPaygoAppConfigOriginDirectList = Array; export const AppsUpdateResultSpectrumConfigPaygoAppConfigOriginDirectList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface AppsUpdateResultSpectrumConfigPaygoAppConfig { /** App identifier. */ id: string; /** When the Application was created. */ createdOn: string; /** The name and type of DNS record for the Spectrum application. */ dns: AppsUpdateResultSpectrumConfigAppConfigDns; /** When the Application was last modified. */ modifiedOn: string; /** The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */ protocol: string; /** List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */ originDirect?: AppsUpdateResultSpectrumConfigPaygoAppConfigOriginDirectList | null; } export const AppsUpdateResultSpectrumConfigPaygoAppConfig = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), dns: AppsUpdateResultSpectrumConfigAppConfigDns, modifiedOn: S.String.pipe(T.Body("modified_on")), protocol: S.String, originDirect: S.optional( S.NullOr( AppsUpdateResultSpectrumConfigPaygoAppConfigOriginDirectList, ).pipe(T.Body("origin_direct")), ), }), ).annotate({ identifier: "AppsUpdateResultSpectrumConfigPaygoAppConfig", }) as any as S.Schema; export type AppsUpdateResult = | AppsUpdateResultSpectrumConfigAppConfig | AppsUpdateResultSpectrumConfigPaygoAppConfig; export const AppsUpdateResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "id", "createdOn", "dns", "modifiedOn", "protocol", "trafficType", "argoSmartRouting", "edgeIps", "ipFirewall", "originDirect", "originDns", "originPort", "proxyProtocol", "tls", "virtualNetworkId", ], ["id", "createdOn", "dns", "modifiedOn", "protocol", "originDirect"], ]), ); export type UpdateAppResponse = AppsUpdateResult; export const UpdateAppResponse = /*@__PURE__*/ S.suspend(() => AppsUpdateResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "UpdateAppResponse", }) as any as S.Schema; export type CreateAppError = | SpectrumProtocolNotAvailable | Forbidden | CloudflareOpError; /** Creates a new Spectrum application from a configuration using a name for the origin. */ export const createApp: API.OperationMethod< CreateAppRequest, CreateAppResponse, CreateAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAppRequest, output: CreateAppResponse, errors: [ SpectrumProtocolNotAvailable, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAppError = | SpectrumAppNotFound | Forbidden | CloudflareOpError; /** Deletes a previously existing application. */ export const deleteApp: API.OperationMethod< DeleteAppRequest, DeleteAppResponse, DeleteAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAppRequest, output: DeleteAppResponse, errors: [ SpectrumAppNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAnalyticAggregateCurrentError = CloudflareOpError; /** Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone. */ export const getAnalyticAggregateCurrent: API.OperationMethod< GetAnalyticAggregateCurrentRequest, GetAnalyticAggregateCurrentResponse, GetAnalyticAggregateCurrentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAnalyticAggregateCurrentRequest, output: GetAnalyticAggregateCurrentResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAnalyticEventBytimeError = CloudflareOpError; /** Retrieves a list of aggregate metrics grouped by time interval. */ export const getAnalyticEventBytime: API.OperationMethod< GetAnalyticEventBytimeRequest, GetAnalyticEventBytimeResponse, GetAnalyticEventBytimeError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAnalyticEventBytimeRequest, output: GetAnalyticEventBytimeResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAnalyticEventSummaryError = CloudflareOpError; /** Retrieves a list of summarised aggregate metrics over a given time period. */ export const getAnalyticEventSummary: API.OperationMethod< GetAnalyticEventSummaryRequest, GetAnalyticEventSummaryResponse, GetAnalyticEventSummaryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAnalyticEventSummaryRequest, output: GetAnalyticEventSummaryResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAppError = SpectrumAppNotFound | Forbidden | CloudflareOpError; /** Gets the application configuration of a specific application inside a zone. */ export const getApp: API.OperationMethod< GetAppRequest, GetAppResponse, GetAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAppRequest, output: GetAppResponse, errors: [ SpectrumAppNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListAppsError = Forbidden | CloudflareOpError; /** Retrieves a list of currently existing Spectrum applications inside a zone. */ export const listApps: API.PaginatedOperationMethod< ListAppsRequest, ListAppsResponse, ListAppsError, CloudflareOpContext > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAppsRequest, output: ListAppsResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ); export type UpdateAppError = | SpectrumAppNotFound | SpectrumProtocolNotAvailable | Forbidden | CloudflareOpError; /** Updates a previously existing application's configuration that uses a name for the origin. */ export const updateApp: API.OperationMethod< UpdateAppRequest, UpdateAppResponse, UpdateAppError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateAppRequest, output: UpdateAppResponse, errors: [ SpectrumAppNotFound, SpectrumProtocolNotAvailable, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, }));