/**
 * Cloudflare SPECTRUM API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service spectrum
 */
import * as Schema from "effect/Schema";
import type * as HttpClient from "effect/unstable/http/HttpClient";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import { type DefaultErrors } from "../errors.ts";
export interface GetAnalyticAggregateCurrentRequest {
    /** Path param: Identifier. */
    zoneId: string;
    /** Query param: Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match. */
    appID?: string;
    /** Query param: Co-location identifier. */
    coloName?: string;
}
export declare const GetAnalyticAggregateCurrentRequest: Schema.Schema<GetAnalyticAggregateCurrentRequest>;
export type GetAnalyticAggregateCurrentResponse = {
    appID: string;
    bytesEgress: number;
    bytesIngress: number;
    connections: number;
    durationAvg: number;
}[];
export declare const GetAnalyticAggregateCurrentResponse: Schema.Schema<GetAnalyticAggregateCurrentResponse>;
export type GetAnalyticAggregateCurrentError = DefaultErrors;
export declare const getAnalyticAggregateCurrent: API.OperationMethod<GetAnalyticAggregateCurrentRequest, GetAnalyticAggregateCurrentResponse, GetAnalyticAggregateCurrentError, Credentials | HttpClient.HttpClient>;
export interface GetAnalyticEventBytimeRequest {
    /** Path param: Identifier. */
    zoneId: string;
    /** Query param: Used to select time series resolution. */
    timeDelta: "year" | "quarter" | "month" | "week" | "day" | "hour" | "dekaminute" | "minute";
    /** Query param: Can be used to break down the data by given attributes. Options are:  | Dimension | Name                          | Example                                                    | | -------- */
    dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[];
    /** Query param: 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 usin */
    filters?: string;
    /** Query param: One or more metrics to compute. Options are:  | Metric         | Name                                | Example | Unit                  | | -------------- | ------------------------------- */
    metrics?: ("count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th")[];
    /** Query param: 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;
    /** Query param: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */
    sort?: string[];
    /** Query param: 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 declare const GetAnalyticEventBytimeRequest: Schema.Schema<GetAnalyticEventBytimeRequest>;
export interface GetAnalyticEventBytimeResponse {
    /** List of columns returned by the analytics query. */
    data: {
        dimensions?: string[] | null;
        metrics?: number[] | number[][] | null;
    }[];
    /** 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: Record<string, unknown>;
    /** Minimum result for each selected metrics across all data. */
    min: Record<string, unknown>;
    query: {
        dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[] | null;
        filters?: string | null;
        limit?: number | null;
        metrics?: ("count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th")[] | null;
        since?: string | null;
        sort?: string[] | null;
        until?: string | null;
    };
    /** Total number of rows in the result. */
    rows: number;
    /** Total result for each selected metrics across all data. */
    totals: Record<string, unknown>;
    /** List of time interval buckets: [start, end] */
    timeIntervals?: string[][] | null;
}
export declare const GetAnalyticEventBytimeResponse: Schema.Schema<GetAnalyticEventBytimeResponse>;
export type GetAnalyticEventBytimeError = DefaultErrors;
export declare const getAnalyticEventBytime: API.OperationMethod<GetAnalyticEventBytimeRequest, GetAnalyticEventBytimeResponse, GetAnalyticEventBytimeError, Credentials | HttpClient.HttpClient>;
export interface GetAnalyticEventSummaryRequest {
    /** Path param: Identifier. */
    zoneId: string;
    /** Query param: Can be used to break down the data by given attributes. Options are:  | Dimension | Name                          | Example                                                    | | -------- */
    dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[];
    /** Query param: 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 usin */
    filters?: string;
    /** Query param: One or more metrics to compute. Options are:  | Metric         | Name                                | Example | Unit                  | | -------------- | ------------------------------- */
    metrics?: ("count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th")[];
    /** Query param: 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;
    /** Query param: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */
    sort?: string[];
    /** Query param: 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 declare const GetAnalyticEventSummaryRequest: Schema.Schema<GetAnalyticEventSummaryRequest>;
export interface GetAnalyticEventSummaryResponse {
    /** List of columns returned by the analytics query. */
    data: {
        dimensions?: string[] | null;
        metrics?: number[] | number[][] | null;
    }[];
    /** 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: Record<string, unknown>;
    /** Minimum result for each selected metrics across all data. */
    min: Record<string, unknown>;
    query: {
        dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[] | null;
        filters?: string | null;
        limit?: number | null;
        metrics?: ("count" | "bytesIngress" | "bytesEgress" | "durationAvg" | "durationMedian" | "duration90th" | "duration99th")[] | null;
        since?: string | null;
        sort?: string[] | null;
        until?: string | null;
    };
    /** Total number of rows in the result. */
    rows: number;
    /** Total result for each selected metrics across all data. */
    totals: Record<string, unknown>;
    /** List of time interval buckets: [start, end] */
    timeIntervals?: string[][] | null;
}
export declare const GetAnalyticEventSummaryResponse: Schema.Schema<GetAnalyticEventSummaryResponse>;
export type GetAnalyticEventSummaryError = DefaultErrors;
export declare const getAnalyticEventSummary: API.OperationMethod<GetAnalyticEventSummaryRequest, GetAnalyticEventSummaryResponse, GetAnalyticEventSummaryError, Credentials | HttpClient.HttpClient>;
export interface GetAppRequest {
    appId: string;
    /** Zone identifier. */
    zoneId: string;
}
export declare const GetAppRequest: Schema.Schema<GetAppRequest>;
export type GetAppResponse = {
    id: string;
    createdOn: string;
    dns: {
        name?: string | null;
        type?: "CNAME" | "ADDRESS" | null;
    };
    modifiedOn: string;
    protocol: string;
    trafficType: "direct" | "http" | "https";
    argoSmartRouting?: boolean | null;
    edgeIps?: {
        connectivity?: "all" | "ipv4" | "ipv6" | null;
        type?: "dynamic" | null;
    } | {
        ips?: string[] | null;
        type?: "static" | null;
    } | null;
    ipFirewall?: boolean | null;
    originDirect?: string[] | null;
    originDns?: {
        name?: string | null;
        ttl?: number | null;
        type?: "" | "A" | "AAAA" | "SRV" | null;
    } | null;
    originPort?: number | string | null;
    proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
    tls?: "off" | "flexible" | "full" | "strict" | null;
} | {
    id: string;
    createdOn: string;
    dns: {
        name?: string | null;
        type?: "CNAME" | "ADDRESS" | null;
    };
    modifiedOn: string;
    protocol: string;
    originDirect?: string[] | null;
};
export declare const GetAppResponse: Schema.Schema<GetAppResponse>;
export type GetAppError = DefaultErrors;
export declare const getApp: API.OperationMethod<GetAppRequest, GetAppResponse, GetAppError, Credentials | HttpClient.HttpClient>;
export interface ListAppsRequest {
    /** Path param: Zone identifier. */
    zoneId: string;
    page?: number;
    perPage?: number;
    /** Query param: Sets the direction by which results are ordered. */
    direction?: "asc" | "desc";
    /** Query param: Application field by which results are ordered. */
    order?: "protocol" | "app_id" | "created_on" | "modified_on" | "dns";
}
export declare const ListAppsRequest: Schema.Schema<ListAppsRequest>;
export interface ListAppsResponse {
    result: ({
        id: string;
        createdOn: string;
        dns: {
            name?: string | null;
            type?: "CNAME" | "ADDRESS" | null;
        };
        modifiedOn: string;
        protocol: string;
        trafficType: "direct" | "http" | "https";
        argoSmartRouting?: boolean | null;
        edgeIps?: {
            connectivity?: "all" | "ipv4" | "ipv6" | null;
            type?: "dynamic" | null;
        } | {
            ips?: string[] | null;
            type?: "static" | null;
        } | null;
        ipFirewall?: boolean | null;
        originDirect?: string[] | null;
        originDns?: {
            name?: string | null;
            ttl?: number | null;
            type?: "" | "A" | "AAAA" | "SRV" | null;
        } | null;
        originPort?: number | string | null;
        proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
        tls?: "off" | "flexible" | "full" | "strict" | null;
    } | {
        id: string;
        createdOn: string;
        dns: {
            name?: string | null;
            type?: "CNAME" | "ADDRESS" | null;
        };
        modifiedOn: string;
        protocol: string;
        originDirect?: string[] | null;
    })[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListAppsResponse: Schema.Schema<ListAppsResponse>;
export type ListAppsError = DefaultErrors;
export declare const listApps: API.PaginatedOperationMethod<ListAppsRequest, ListAppsResponse, ListAppsError, Credentials | HttpClient.HttpClient>;
export interface CreateAppRequest {
    /** Path param: Zone identifier. */
    zoneId: string;
    /** Body param: The name and type of DNS record for the Spectrum application. */
    dns: {
        name?: string;
        type?: "CNAME" | "ADDRESS";
    };
    /** Body param: 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;
    /** Body param: 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 */
    trafficType: "direct" | "http" | "https";
    /** Body param: Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". */
    argoSmartRouting?: boolean;
    /** Body param: The anycast edge IP configuration for the hostname of this application. */
    edgeIps?: {
        connectivity?: "all" | "ipv4" | "ipv6";
        type?: "dynamic";
    } | {
        ips?: string[];
        type?: "static";
    };
    /** Body param: Enables IP Access Rules for this application. Notes: Only available for TCP applications. */
    ipFirewall?: boolean;
    /** Body param: List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */
    originDirect?: string[];
    /** Body param: The name and type of DNS record for the Spectrum application. */
    originDns?: {
        name?: string;
        ttl?: number;
        type?: "" | "A" | "AAAA" | "SRV";
    };
    /** Body param: 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 */
    originPort?: number | string;
    /** Body param: 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 Proto */
    proxyProtocol?: "off" | "v1" | "v2" | "simple";
    /** Body param: The type of TLS termination associated with the application. */
    tls?: "off" | "flexible" | "full" | "strict";
}
export declare const CreateAppRequest: Schema.Schema<CreateAppRequest>;
export type CreateAppResponse = {
    id: string;
    createdOn: string;
    dns: {
        name?: string | null;
        type?: "CNAME" | "ADDRESS" | null;
    };
    modifiedOn: string;
    protocol: string;
    trafficType: "direct" | "http" | "https";
    argoSmartRouting?: boolean | null;
    edgeIps?: {
        connectivity?: "all" | "ipv4" | "ipv6" | null;
        type?: "dynamic" | null;
    } | {
        ips?: string[] | null;
        type?: "static" | null;
    } | null;
    ipFirewall?: boolean | null;
    originDirect?: string[] | null;
    originDns?: {
        name?: string | null;
        ttl?: number | null;
        type?: "" | "A" | "AAAA" | "SRV" | null;
    } | null;
    originPort?: number | string | null;
    proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
    tls?: "off" | "flexible" | "full" | "strict" | null;
} | {
    id: string;
    createdOn: string;
    dns: {
        name?: string | null;
        type?: "CNAME" | "ADDRESS" | null;
    };
    modifiedOn: string;
    protocol: string;
    originDirect?: string[] | null;
};
export declare const CreateAppResponse: Schema.Schema<CreateAppResponse>;
export type CreateAppError = DefaultErrors;
export declare const createApp: API.OperationMethod<CreateAppRequest, CreateAppResponse, CreateAppError, Credentials | HttpClient.HttpClient>;
export interface UpdateAppRequest {
    appId: string;
    /** Path param: Zone identifier. */
    zoneId: string;
    /** Body param: The name and type of DNS record for the Spectrum application. */
    dns: {
        name?: string;
        type?: "CNAME" | "ADDRESS";
    };
    /** Body param: 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;
    /** Body param: 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 */
    trafficType: "direct" | "http" | "https";
    /** Body param: Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". */
    argoSmartRouting?: boolean;
    /** Body param: The anycast edge IP configuration for the hostname of this application. */
    edgeIps?: {
        connectivity?: "all" | "ipv4" | "ipv6";
        type?: "dynamic";
    } | {
        ips?: string[];
        type?: "static";
    };
    /** Body param: Enables IP Access Rules for this application. Notes: Only available for TCP applications. */
    ipFirewall?: boolean;
    /** Body param: List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */
    originDirect?: string[];
    /** Body param: The name and type of DNS record for the Spectrum application. */
    originDns?: {
        name?: string;
        ttl?: number;
        type?: "" | "A" | "AAAA" | "SRV";
    };
    /** Body param: 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 */
    originPort?: number | string;
    /** Body param: 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 Proto */
    proxyProtocol?: "off" | "v1" | "v2" | "simple";
    /** Body param: The type of TLS termination associated with the application. */
    tls?: "off" | "flexible" | "full" | "strict";
}
export declare const UpdateAppRequest: Schema.Schema<UpdateAppRequest>;
export type UpdateAppResponse = {
    id: string;
    createdOn: string;
    dns: {
        name?: string | null;
        type?: "CNAME" | "ADDRESS" | null;
    };
    modifiedOn: string;
    protocol: string;
    trafficType: "direct" | "http" | "https";
    argoSmartRouting?: boolean | null;
    edgeIps?: {
        connectivity?: "all" | "ipv4" | "ipv6" | null;
        type?: "dynamic" | null;
    } | {
        ips?: string[] | null;
        type?: "static" | null;
    } | null;
    ipFirewall?: boolean | null;
    originDirect?: string[] | null;
    originDns?: {
        name?: string | null;
        ttl?: number | null;
        type?: "" | "A" | "AAAA" | "SRV" | null;
    } | null;
    originPort?: number | string | null;
    proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
    tls?: "off" | "flexible" | "full" | "strict" | null;
} | {
    id: string;
    createdOn: string;
    dns: {
        name?: string | null;
        type?: "CNAME" | "ADDRESS" | null;
    };
    modifiedOn: string;
    protocol: string;
    originDirect?: string[] | null;
};
export declare const UpdateAppResponse: Schema.Schema<UpdateAppResponse>;
export type UpdateAppError = DefaultErrors;
export declare const updateApp: API.OperationMethod<UpdateAppRequest, UpdateAppResponse, UpdateAppError, Credentials | HttpClient.HttpClient>;
export interface DeleteAppRequest {
    appId: string;
    /** Zone identifier. */
    zoneId: string;
}
export declare const DeleteAppRequest: Schema.Schema<DeleteAppRequest>;
export interface DeleteAppResponse {
    /** Identifier. */
    id: string;
}
export declare const DeleteAppResponse: Schema.Schema<DeleteAppResponse>;
export type DeleteAppError = DefaultErrors;
export declare const deleteApp: API.OperationMethod<DeleteAppRequest, DeleteAppResponse, DeleteAppError, Credentials | HttpClient.HttpClient>;
//# sourceMappingURL=spectrum.d.ts.map