/**
 * Cloudflare RATE-LIMITS API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service rate-limits
 */
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 GetRateLimitRequest {
    rateLimitId: string;
    /** Defines an identifier. */
    zoneId: string;
}
export declare const GetRateLimitRequest: Schema.Schema<GetRateLimitRequest>;
export interface GetRateLimitResponse {
    /** The unique identifier of the rate limit. */
    id?: string | null;
    /** The action to perform when the threshold of matched traffic within the configured period is exceeded. */
    action?: {
        mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge" | null;
        response?: {
            body?: string | null;
            contentType?: string | null;
        } | null;
        timeout?: number | null;
    } | null;
    /** Criteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs. */
    bypass?: {
        name?: "url" | null;
        value?: string | null;
    }[] | null;
    /** An informative summary of the rule. This value is sanitized and any tags will be removed. */
    description?: string | null;
    /** When true, indicates that the rate limit is currently disabled. */
    disabled?: boolean | null;
    /** Determines which traffic the rate limit counts towards the threshold. */
    match?: {
        headers?: {
            name?: string | null;
            op?: "eq" | "ne" | null;
            value?: string | null;
        }[] | null;
        request?: {
            methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[] | null;
            schemes?: string[] | null;
            url?: string | null;
        } | null;
        response?: {
            originTraffic?: boolean | null;
        } | null;
    } | null;
    /** The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. */
    period?: number | null;
    /** The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. */
    threshold?: number | null;
}
export declare const GetRateLimitResponse: Schema.Schema<GetRateLimitResponse>;
export type GetRateLimitError = DefaultErrors;
export declare const getRateLimit: API.OperationMethod<GetRateLimitRequest, GetRateLimitResponse, GetRateLimitError, Credentials | HttpClient.HttpClient>;
export interface ListRateLimitsRequest {
    /** Path param: Defines an identifier. */
    zoneId: string;
    page?: number;
    perPage?: number;
}
export declare const ListRateLimitsRequest: Schema.Schema<ListRateLimitsRequest>;
export interface ListRateLimitsResponse {
    result: {
        id?: string | null;
        action?: {
            mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge" | null;
            response?: {
                body?: string | null;
                contentType?: string | null;
            } | null;
            timeout?: number | null;
        } | null;
        bypass?: {
            name?: "url" | null;
            value?: string | null;
        }[] | null;
        description?: string | null;
        disabled?: boolean | null;
        match?: {
            headers?: {
                name?: string | null;
                op?: "eq" | "ne" | null;
                value?: string | null;
            }[] | null;
            request?: {
                methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[] | null;
                schemes?: string[] | null;
                url?: string | null;
            } | null;
            response?: {
                originTraffic?: boolean | null;
            } | null;
        } | null;
        period?: number | null;
        threshold?: number | null;
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListRateLimitsResponse: Schema.Schema<ListRateLimitsResponse>;
export type ListRateLimitsError = DefaultErrors;
export declare const listRateLimits: API.PaginatedOperationMethod<ListRateLimitsRequest, ListRateLimitsResponse, ListRateLimitsError, Credentials | HttpClient.HttpClient>;
export interface CreateRateLimitRequest {
    /** Path param: Defines an identifier. */
    zoneId: string;
    /** Body param: The action to perform when the threshold of matched traffic within the configured period is exceeded. */
    action: {
        mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge";
        response?: {
            body?: string;
            contentType?: string;
        };
        timeout?: number;
    };
    /** Body param: Determines which traffic the rate limit counts towards the threshold. */
    match: {
        headers?: {
            name?: string;
            op?: "eq" | "ne";
            value?: string;
        }[];
        request?: {
            methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[];
            schemes?: string[];
            url?: string;
        };
        response?: {
            originTraffic?: boolean;
        };
    };
    /** Body param: The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. */
    period: number;
    /** Body param: The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. */
    threshold: number;
}
export declare const CreateRateLimitRequest: Schema.Schema<CreateRateLimitRequest>;
export interface CreateRateLimitResponse {
    /** The unique identifier of the rate limit. */
    id?: string | null;
    /** The action to perform when the threshold of matched traffic within the configured period is exceeded. */
    action?: {
        mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge" | null;
        response?: {
            body?: string | null;
            contentType?: string | null;
        } | null;
        timeout?: number | null;
    } | null;
    /** Criteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs. */
    bypass?: {
        name?: "url" | null;
        value?: string | null;
    }[] | null;
    /** An informative summary of the rule. This value is sanitized and any tags will be removed. */
    description?: string | null;
    /** When true, indicates that the rate limit is currently disabled. */
    disabled?: boolean | null;
    /** Determines which traffic the rate limit counts towards the threshold. */
    match?: {
        headers?: {
            name?: string | null;
            op?: "eq" | "ne" | null;
            value?: string | null;
        }[] | null;
        request?: {
            methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[] | null;
            schemes?: string[] | null;
            url?: string | null;
        } | null;
        response?: {
            originTraffic?: boolean | null;
        } | null;
    } | null;
    /** The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. */
    period?: number | null;
    /** The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. */
    threshold?: number | null;
}
export declare const CreateRateLimitResponse: Schema.Schema<CreateRateLimitResponse>;
export type CreateRateLimitError = DefaultErrors;
export declare const createRateLimit: API.OperationMethod<CreateRateLimitRequest, CreateRateLimitResponse, CreateRateLimitError, Credentials | HttpClient.HttpClient>;
export interface DeleteRateLimitRequest {
    rateLimitId: string;
    /** Defines an identifier. */
    zoneId: string;
}
export declare const DeleteRateLimitRequest: Schema.Schema<DeleteRateLimitRequest>;
export interface DeleteRateLimitResponse {
    /** The unique identifier of the rate limit. */
    id?: string | null;
    /** The action to perform when the threshold of matched traffic within the configured period is exceeded. */
    action?: {
        mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge" | null;
        response?: {
            body?: string | null;
            contentType?: string | null;
        } | null;
        timeout?: number | null;
    } | null;
    /** Criteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs. */
    bypass?: {
        name?: "url" | null;
        value?: string | null;
    }[] | null;
    /** An informative summary of the rule. This value is sanitized and any tags will be removed. */
    description?: string | null;
    /** When true, indicates that the rate limit is currently disabled. */
    disabled?: boolean | null;
    /** Determines which traffic the rate limit counts towards the threshold. */
    match?: {
        headers?: {
            name?: string | null;
            op?: "eq" | "ne" | null;
            value?: string | null;
        }[] | null;
        request?: {
            methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[] | null;
            schemes?: string[] | null;
            url?: string | null;
        } | null;
        response?: {
            originTraffic?: boolean | null;
        } | null;
    } | null;
    /** The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. */
    period?: number | null;
    /** The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. */
    threshold?: number | null;
}
export declare const DeleteRateLimitResponse: Schema.Schema<DeleteRateLimitResponse>;
export type DeleteRateLimitError = DefaultErrors;
export declare const deleteRateLimit: API.OperationMethod<DeleteRateLimitRequest, DeleteRateLimitResponse, DeleteRateLimitError, Credentials | HttpClient.HttpClient>;
export interface EditRateLimitRequest {
    rateLimitId: string;
    /** Path param: Defines an identifier. */
    zoneId: string;
    /** Body param: The action to perform when the threshold of matched traffic within the configured period is exceeded. */
    action: {
        mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge";
        response?: {
            body?: string;
            contentType?: string;
        };
        timeout?: number;
    };
    /** Body param: Determines which traffic the rate limit counts towards the threshold. */
    match: {
        headers?: {
            name?: string;
            op?: "eq" | "ne";
            value?: string;
        }[];
        request?: {
            methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[];
            schemes?: string[];
            url?: string;
        };
        response?: {
            originTraffic?: boolean;
        };
    };
    /** Body param: The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. */
    period: number;
    /** Body param: The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. */
    threshold: number;
}
export declare const EditRateLimitRequest: Schema.Schema<EditRateLimitRequest>;
export interface EditRateLimitResponse {
    /** The unique identifier of the rate limit. */
    id?: string | null;
    /** The action to perform when the threshold of matched traffic within the configured period is exceeded. */
    action?: {
        mode?: "simulate" | "ban" | "challenge" | "js_challenge" | "managed_challenge" | null;
        response?: {
            body?: string | null;
            contentType?: string | null;
        } | null;
        timeout?: number | null;
    } | null;
    /** Criteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs. */
    bypass?: {
        name?: "url" | null;
        value?: string | null;
    }[] | null;
    /** An informative summary of the rule. This value is sanitized and any tags will be removed. */
    description?: string | null;
    /** When true, indicates that the rate limit is currently disabled. */
    disabled?: boolean | null;
    /** Determines which traffic the rate limit counts towards the threshold. */
    match?: {
        headers?: {
            name?: string | null;
            op?: "eq" | "ne" | null;
            value?: string | null;
        }[] | null;
        request?: {
            methods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "_ALL_")[] | null;
            schemes?: string[] | null;
            url?: string | null;
        } | null;
        response?: {
            originTraffic?: boolean | null;
        } | null;
    } | null;
    /** The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. */
    period?: number | null;
    /** The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. */
    threshold?: number | null;
}
export declare const EditRateLimitResponse: Schema.Schema<EditRateLimitResponse>;
export type EditRateLimitError = DefaultErrors;
export declare const editRateLimit: API.OperationMethod<EditRateLimitRequest, EditRateLimitResponse, EditRateLimitError, Credentials | HttpClient.HttpClient>;
//# sourceMappingURL=rate-limits.d.ts.map