import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as RulesAPI from 'cloudflare/resources/rulesets/rules';
import * as RulesetsAPI from 'cloudflare/resources/rulesets/rulesets';
export declare class Rules extends APIResource {
    /**
     * Adds a new rule to an account or zone ruleset. The rule will be added to the end
     * of the existing list of rules in the ruleset by default.
     */
    create(rulesetId: string, params: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RulesetsAPI.RulesetsRulesetResponse>;
    /**
     * Deletes an existing rule from an account or zone ruleset.
     */
    delete(rulesetId: string, ruleId: string, params?: RuleDeleteParams, options?: Core.RequestOptions): Core.APIPromise<RulesetsAPI.RulesetsRulesetResponse>;
    delete(rulesetId: string, ruleId: string, options?: Core.RequestOptions): Core.APIPromise<RulesetsAPI.RulesetsRulesetResponse>;
    /**
     * Updates an existing rule in an account ruleset.
     */
    edit(rulesetId: string, ruleId: string, params: RuleEditParams, options?: Core.RequestOptions): Core.APIPromise<RulesetsAPI.RulesetsRulesetResponse>;
}
export interface RuleCreateParams {
    /**
     * 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 object configuring where the rule will be placed.
     */
    position?: RuleCreateParams.BeforePosition | RuleCreateParams.AfterPosition | RuleCreateParams.IndexPosition;
}
export declare namespace RuleCreateParams {
    /**
     * An object configuring where the rule will be placed.
     */
    interface BeforePosition {
        /**
         * The ID of another rule to place the rule before. An empty value causes the rule
         * to be placed at the top.
         */
        before?: string;
    }
    /**
     * An object configuring where the rule will be placed.
     */
    interface AfterPosition {
        /**
         * The ID of another rule to place the rule after. An empty value causes the rule
         * to be placed at the bottom.
         */
        after?: string;
    }
    /**
     * An object configuring where the rule will be placed.
     */
    interface IndexPosition {
        /**
         * An index at which to place the rule, where index 1 is the first rule.
         */
        index?: number;
    }
}
export interface RuleDeleteParams {
    /**
     * 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 RuleEditParams {
    /**
     * 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 object configuring where the rule will be placed.
     */
    position?: RuleEditParams.BeforePosition | RuleEditParams.AfterPosition | RuleEditParams.IndexPosition;
}
export declare namespace RuleEditParams {
    /**
     * An object configuring where the rule will be placed.
     */
    interface BeforePosition {
        /**
         * The ID of another rule to place the rule before. An empty value causes the rule
         * to be placed at the top.
         */
        before?: string;
    }
    /**
     * An object configuring where the rule will be placed.
     */
    interface AfterPosition {
        /**
         * The ID of another rule to place the rule after. An empty value causes the rule
         * to be placed at the bottom.
         */
        after?: string;
    }
    /**
     * An object configuring where the rule will be placed.
     */
    interface IndexPosition {
        /**
         * An index at which to place the rule, where index 1 is the first rule.
         */
        index?: number;
    }
}
export declare namespace Rules {
    export import RuleCreateParams = RulesAPI.RuleCreateParams;
    export import RuleDeleteParams = RulesAPI.RuleDeleteParams;
    export import RuleEditParams = RulesAPI.RuleEditParams;
}
//# sourceMappingURL=rules.d.ts.map