import * as Core from 'cloudflaredev/core';
import { APIResource } from 'cloudflaredev/resource';
import * as RulesAPI from 'cloudflaredev/resources/rulesets/rules';
import * as PhasesAPI from 'cloudflaredev/resources/rulesets/phases/phases';
import * as VersionsAPI from 'cloudflaredev/resources/rulesets/versions/versions';
import { SinglePage } from 'cloudflaredev/pagination';
export declare class Rulesets extends APIResource {
    phases: PhasesAPI.Phases;
    rules: RulesAPI.Rules;
    versions: VersionsAPI.Versions;
    /**
     * Creates a ruleset.
     */
    create(params: RulesetCreateParams, options?: Core.RequestOptions): Core.APIPromise<RulesetCreateResponse>;
    /**
     * Updates an account or zone ruleset, creating a new version.
     */
    update(rulesetId: string, params: RulesetUpdateParams, options?: Core.RequestOptions): Core.APIPromise<RulesetUpdateResponse>;
    /**
     * Fetches all rulesets.
     */
    list(params?: RulesetListParams, options?: Core.RequestOptions): Core.PagePromise<RulesetsSinglePage, Ruleset>;
    list(options?: Core.RequestOptions): Core.PagePromise<RulesetsSinglePage, Ruleset>;
    /**
     * Deletes all versions of an existing account or zone ruleset.
     */
    delete(rulesetId: string, params?: RulesetDeleteParams, options?: Core.RequestOptions): Core.APIPromise<void>;
    delete(rulesetId: string, options?: Core.RequestOptions): Core.APIPromise<void>;
    /**
     * Fetches the latest version of an account or zone ruleset.
     */
    get(rulesetId: string, params?: RulesetGetParams, options?: Core.RequestOptions): Core.APIPromise<RulesetGetResponse>;
    get(rulesetId: string, options?: Core.RequestOptions): Core.APIPromise<RulesetGetResponse>;
}
export declare class RulesetsSinglePage extends SinglePage<Ruleset> {
}
/**
 * The kind of the ruleset.
 */
export type Kind = 'managed' | 'custom' | 'root' | 'zone';
/**
 * The kind of the ruleset.
 */
export type KindParam = 'managed' | 'custom' | 'root' | 'zone';
/**
 * The phase of the ruleset.
 */
export type Phase = 'ddos_l4' | 'ddos_l7' | 'http_config_settings' | 'http_custom_errors' | 'http_log_custom_fields' | 'http_ratelimit' | 'http_request_cache_settings' | 'http_request_dynamic_redirect' | 'http_request_firewall_custom' | 'http_request_firewall_managed' | 'http_request_late_transform' | 'http_request_origin' | 'http_request_redirect' | 'http_request_sanitize' | 'http_request_sbfm' | 'http_request_select_configuration' | 'http_request_transform' | 'http_response_compression' | 'http_response_firewall_managed' | 'http_response_headers_transform' | 'magic_transit' | 'magic_transit_ids_managed' | 'magic_transit_managed';
/**
 * The phase of the ruleset.
 */
export type PhaseParam = 'ddos_l4' | 'ddos_l7' | 'http_config_settings' | 'http_custom_errors' | 'http_log_custom_fields' | 'http_ratelimit' | 'http_request_cache_settings' | 'http_request_dynamic_redirect' | 'http_request_firewall_custom' | 'http_request_firewall_managed' | 'http_request_late_transform' | 'http_request_origin' | 'http_request_redirect' | 'http_request_sanitize' | 'http_request_sbfm' | 'http_request_select_configuration' | 'http_request_transform' | 'http_response_compression' | 'http_response_firewall_managed' | 'http_response_headers_transform' | 'magic_transit' | 'magic_transit_ids_managed' | 'magic_transit_managed';
/**
 * A ruleset object.
 */
export interface Ruleset {
    /**
     * The unique ID of the ruleset.
     */
    id: string;
    /**
     * The timestamp of when the ruleset was last modified.
     */
    last_updated: string;
    /**
     * The version of the ruleset.
     */
    version: string;
    /**
     * An informative description of the ruleset.
     */
    description?: string;
    /**
     * The kind of the ruleset.
     */
    kind?: Kind;
    /**
     * The human-readable name of the ruleset.
     */
    name?: string;
    /**
     * The phase of the ruleset.
     */
    phase?: Phase;
}
/**
 * A ruleset object.
 */
export interface RulesetCreateResponse {
    /**
     * The unique ID of the ruleset.
     */
    id: string;
    /**
     * The kind of the ruleset.
     */
    kind: Kind;
    /**
     * The timestamp of when the ruleset was last modified.
     */
    last_updated: string;
    /**
     * The human-readable name of the ruleset.
     */
    name: string;
    /**
     * The phase of the ruleset.
     */
    phase: Phase;
    /**
     * The list of rules in the ruleset.
     */
    rules: Array<RulesAPI.BlockRule | RulesAPI.ChallengeRule | RulesAPI.CompressResponseRule | RulesAPI.ExecuteRule | RulesAPI.JSChallengeRule | RulesAPI.LogRule | RulesAPI.ManagedChallengeRule | RulesAPI.RedirectRule | RulesAPI.RewriteRule | RulesAPI.RouteRule | RulesAPI.ScoreRule | RulesAPI.ServeErrorRule | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule>;
    /**
     * The version of the ruleset.
     */
    version: string;
    /**
     * An informative description of the ruleset.
     */
    description?: string;
}
/**
 * A ruleset object.
 */
export interface RulesetUpdateResponse {
    /**
     * The unique ID of the ruleset.
     */
    id: string;
    /**
     * The kind of the ruleset.
     */
    kind: Kind;
    /**
     * The timestamp of when the ruleset was last modified.
     */
    last_updated: string;
    /**
     * The human-readable name of the ruleset.
     */
    name: string;
    /**
     * The phase of the ruleset.
     */
    phase: Phase;
    /**
     * The list of rules in the ruleset.
     */
    rules: Array<RulesAPI.BlockRule | RulesAPI.ChallengeRule | RulesAPI.CompressResponseRule | RulesAPI.ExecuteRule | RulesAPI.JSChallengeRule | RulesAPI.LogRule | RulesAPI.ManagedChallengeRule | RulesAPI.RedirectRule | RulesAPI.RewriteRule | RulesAPI.RouteRule | RulesAPI.ScoreRule | RulesAPI.ServeErrorRule | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule>;
    /**
     * The version of the ruleset.
     */
    version: string;
    /**
     * An informative description of the ruleset.
     */
    description?: string;
}
/**
 * A ruleset object.
 */
export interface RulesetGetResponse {
    /**
     * The unique ID of the ruleset.
     */
    id: string;
    /**
     * The kind of the ruleset.
     */
    kind: Kind;
    /**
     * The timestamp of when the ruleset was last modified.
     */
    last_updated: string;
    /**
     * The human-readable name of the ruleset.
     */
    name: string;
    /**
     * The phase of the ruleset.
     */
    phase: Phase;
    /**
     * The list of rules in the ruleset.
     */
    rules: Array<RulesAPI.BlockRule | RulesAPI.ChallengeRule | RulesAPI.CompressResponseRule | RulesAPI.ExecuteRule | RulesAPI.JSChallengeRule | RulesAPI.LogRule | RulesAPI.ManagedChallengeRule | RulesAPI.RedirectRule | RulesAPI.RewriteRule | RulesAPI.RouteRule | RulesAPI.ScoreRule | RulesAPI.ServeErrorRule | RulesAPI.SetConfigRule | RulesAPI.SkipRule | RulesAPI.SetCacheSettingsRule>;
    /**
     * The version of the ruleset.
     */
    version: string;
    /**
     * An informative description of the ruleset.
     */
    description?: string;
}
export interface RulesetCreateParams {
    /**
     * Body param: The kind of the ruleset.
     */
    kind: KindParam;
    /**
     * Body param: The human-readable name of the ruleset.
     */
    name: string;
    /**
     * Body param: The phase of the ruleset.
     */
    phase: PhaseParam;
    /**
     * Body param: The list of rules in the ruleset.
     */
    rules: Array<RulesAPI.BlockRuleParam | RulesAPI.ChallengeRuleParam | RulesAPI.CompressResponseRuleParam | RulesAPI.ExecuteRuleParam | RulesAPI.JSChallengeRuleParam | RulesAPI.LogRuleParam | RulesAPI.ManagedChallengeRuleParam | RulesAPI.RedirectRuleParam | RulesAPI.RewriteRuleParam | RulesAPI.RouteRuleParam | RulesAPI.ScoreRuleParam | RulesAPI.ServeErrorRuleParam | RulesAPI.SetConfigRuleParam | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam>;
    /**
     * Path param: The Account ID to use for this endpoint. Mutually exclusive with the
     * Zone ID.
     */
    account_id?: string;
    /**
     * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
     * Account ID.
     */
    zone_id?: string;
    /**
     * Body param: An informative description of the ruleset.
     */
    description?: string;
}
export interface RulesetUpdateParams {
    /**
     * Body param: The list of rules in the ruleset.
     */
    rules: Array<RulesAPI.BlockRuleParam | RulesAPI.ChallengeRuleParam | RulesAPI.CompressResponseRuleParam | RulesAPI.ExecuteRuleParam | RulesAPI.JSChallengeRuleParam | RulesAPI.LogRuleParam | RulesAPI.ManagedChallengeRuleParam | RulesAPI.RedirectRuleParam | RulesAPI.RewriteRuleParam | RulesAPI.RouteRuleParam | RulesAPI.ScoreRuleParam | RulesAPI.ServeErrorRuleParam | RulesAPI.SetConfigRuleParam | RulesAPI.SkipRuleParam | RulesAPI.SetCacheSettingsRuleParam>;
    /**
     * Path param: The Account ID to use for this endpoint. Mutually exclusive with the
     * Zone ID.
     */
    account_id?: string;
    /**
     * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
     * Account ID.
     */
    zone_id?: string;
    /**
     * Body param: An informative description of the ruleset.
     */
    description?: string;
    /**
     * Body param: The kind of the ruleset.
     */
    kind?: KindParam;
    /**
     * Body param: The human-readable name of the ruleset.
     */
    name?: string;
    /**
     * Body param: The phase of the ruleset.
     */
    phase?: PhaseParam;
}
export interface RulesetListParams {
    /**
     * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
     */
    account_id?: string;
    /**
     * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
     */
    zone_id?: string;
}
export interface RulesetDeleteParams {
    /**
     * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
     */
    account_id?: string;
    /**
     * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
     */
    zone_id?: string;
}
export interface RulesetGetParams {
    /**
     * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
     */
    account_id?: string;
    /**
     * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
     */
    zone_id?: string;
}
export declare namespace Rulesets {
    export import Phases = PhasesAPI.Phases;
    export import PhaseUpdateResponse = PhasesAPI.PhaseUpdateResponse;
    export import PhaseGetResponse = PhasesAPI.PhaseGetResponse;
    export import PhaseUpdateParams = PhasesAPI.PhaseUpdateParams;
    export import PhaseGetParams = PhasesAPI.PhaseGetParams;
    export import Rules = RulesAPI.Rules;
    export import BlockRule = RulesAPI.BlockRule;
    export import ChallengeRule = RulesAPI.ChallengeRule;
    export import CompressResponseRule = RulesAPI.CompressResponseRule;
    export import ExecuteRule = RulesAPI.ExecuteRule;
    export import JSChallengeRule = RulesAPI.JSChallengeRule;
    export import LogRule = RulesAPI.LogRule;
    export import Logging = RulesAPI.Logging;
    export import ManagedChallengeRule = RulesAPI.ManagedChallengeRule;
    export import RedirectRule = RulesAPI.RedirectRule;
    export import RewriteRule = RulesAPI.RewriteRule;
    export import RewriteURIPart = RulesAPI.RewriteURIPart;
    export import RouteRule = RulesAPI.RouteRule;
    export import RulesetRule = RulesAPI.RulesetRule;
    export import ScoreRule = RulesAPI.ScoreRule;
    export import ServeErrorRule = RulesAPI.ServeErrorRule;
    export import SetCacheSettingsRule = RulesAPI.SetCacheSettingsRule;
    export import SetConfigRule = RulesAPI.SetConfigRule;
    export import SkipRule = RulesAPI.SkipRule;
    export import RuleCreateResponse = RulesAPI.RuleCreateResponse;
    export import RuleDeleteResponse = RulesAPI.RuleDeleteResponse;
    export import RuleEditResponse = RulesAPI.RuleEditResponse;
    export import RuleCreateParams = RulesAPI.RuleCreateParams;
    export import RuleDeleteParams = RulesAPI.RuleDeleteParams;
    export import RuleEditParams = RulesAPI.RuleEditParams;
    export import Versions = VersionsAPI.Versions;
    export import VersionGetResponse = VersionsAPI.VersionGetResponse;
    export import VersionListParams = VersionsAPI.VersionListParams;
    export import VersionDeleteParams = VersionsAPI.VersionDeleteParams;
    export import VersionGetParams = VersionsAPI.VersionGetParams;
}
//# sourceMappingURL=rulesets.d.ts.map