/**
 * Cloudflare RULES API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service rules
 */
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 GetListRequest {
    listId: string;
    /** The Account ID for this resource. */
    accountId: string;
}
export declare const GetListRequest: Schema.Schema<GetListRequest>;
export interface GetListResponse {
    /** The unique ID of the list. */
    id: string;
    /** The RFC 3339 timestamp of when the list was created. */
    createdOn: string;
    /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */
    kind: "ip" | "redirect" | "hostname" | "asn";
    /** The RFC 3339 timestamp of when the list was last modified. */
    modifiedOn: string;
    /** An informative name for the list. Use this name in filter and rule expressions. */
    name: string;
    /** The number of items in the list. */
    numItems: number;
    /** The number of [filters](/api/resources/filters/) referencing the list. */
    numReferencingFilters: number;
    /** An informative summary of the list. */
    description?: string | null;
}
export declare const GetListResponse: Schema.Schema<GetListResponse>;
export type GetListError = DefaultErrors;
export declare const getList: API.OperationMethod<GetListRequest, GetListResponse, GetListError, Credentials | HttpClient.HttpClient>;
export interface ListListsRequest {
    /** The Account ID for this resource. */
    accountId: string;
}
export declare const ListListsRequest: Schema.Schema<ListListsRequest>;
export interface ListListsResponse {
    result: {
        id: string;
        createdOn: string;
        kind: "ip" | "redirect" | "hostname" | "asn";
        modifiedOn: string;
        name: string;
        numItems: number;
        numReferencingFilters: number;
        description?: string | null;
    }[];
}
export declare const ListListsResponse: Schema.Schema<ListListsResponse>;
export type ListListsError = DefaultErrors;
export declare const listLists: API.PaginatedOperationMethod<ListListsRequest, ListListsResponse, ListListsError, Credentials | HttpClient.HttpClient>;
export interface CreateListRequest {
    /** Path param: The Account ID for this resource. */
    accountId: string;
    /** Body param: The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */
    kind: "ip" | "redirect" | "hostname" | "asn";
    /** Body param: An informative name for the list. Use this name in filter and rule expressions. */
    name: string;
    /** Body param: An informative summary of the list. */
    description?: string;
}
export declare const CreateListRequest: Schema.Schema<CreateListRequest>;
export interface CreateListResponse {
    /** The unique ID of the list. */
    id: string;
    /** The RFC 3339 timestamp of when the list was created. */
    createdOn: string;
    /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */
    kind: "ip" | "redirect" | "hostname" | "asn";
    /** The RFC 3339 timestamp of when the list was last modified. */
    modifiedOn: string;
    /** An informative name for the list. Use this name in filter and rule expressions. */
    name: string;
    /** The number of items in the list. */
    numItems: number;
    /** The number of [filters](/api/resources/filters/) referencing the list. */
    numReferencingFilters: number;
    /** An informative summary of the list. */
    description?: string | null;
}
export declare const CreateListResponse: Schema.Schema<CreateListResponse>;
export type CreateListError = DefaultErrors;
export declare const createList: API.OperationMethod<CreateListRequest, CreateListResponse, CreateListError, Credentials | HttpClient.HttpClient>;
export interface UpdateListRequest {
    listId: string;
    /** Path param: The Account ID for this resource. */
    accountId: string;
    /** Body param: An informative summary of the list. */
    description?: string;
}
export declare const UpdateListRequest: Schema.Schema<UpdateListRequest>;
export interface UpdateListResponse {
    /** The unique ID of the list. */
    id: string;
    /** The RFC 3339 timestamp of when the list was created. */
    createdOn: string;
    /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */
    kind: "ip" | "redirect" | "hostname" | "asn";
    /** The RFC 3339 timestamp of when the list was last modified. */
    modifiedOn: string;
    /** An informative name for the list. Use this name in filter and rule expressions. */
    name: string;
    /** The number of items in the list. */
    numItems: number;
    /** The number of [filters](/api/resources/filters/) referencing the list. */
    numReferencingFilters: number;
    /** An informative summary of the list. */
    description?: string | null;
}
export declare const UpdateListResponse: Schema.Schema<UpdateListResponse>;
export type UpdateListError = DefaultErrors;
export declare const updateList: API.OperationMethod<UpdateListRequest, UpdateListResponse, UpdateListError, Credentials | HttpClient.HttpClient>;
export interface DeleteListRequest {
    listId: string;
    /** The Account ID for this resource. */
    accountId: string;
}
export declare const DeleteListRequest: Schema.Schema<DeleteListRequest>;
export interface DeleteListResponse {
    /** The unique ID of the list. */
    id: string;
}
export declare const DeleteListResponse: Schema.Schema<DeleteListResponse>;
export type DeleteListError = DefaultErrors;
export declare const deleteList: API.OperationMethod<DeleteListRequest, DeleteListResponse, DeleteListError, Credentials | HttpClient.HttpClient>;
export interface GetListBulkOperationRequest {
    operationId: string;
    /** The Account ID for this resource. */
    accountId: string;
}
export declare const GetListBulkOperationRequest: Schema.Schema<GetListBulkOperationRequest>;
export type GetListBulkOperationResponse = {
    id: string;
    status: "pending" | "running";
} | {
    id: string;
    completed: string;
    status: "completed";
} | {
    id: string;
    completed: string;
    error: string;
    status: "failed";
};
export declare const GetListBulkOperationResponse: Schema.Schema<GetListBulkOperationResponse>;
export type GetListBulkOperationError = DefaultErrors;
export declare const getListBulkOperation: API.OperationMethod<GetListBulkOperationRequest, GetListBulkOperationResponse, GetListBulkOperationError, Credentials | HttpClient.HttpClient>;
export interface GetListItemRequest {
    listId: string;
    itemId: string;
    /** The Account ID for this resource. */
    accountId: string;
}
export declare const GetListItemRequest: Schema.Schema<GetListItemRequest>;
export type GetListItemResponse = {
    id: string;
    createdOn: string;
    ip: string;
    modifiedOn: string;
    comment?: string | null;
} | {
    id: string;
    createdOn: string;
    hostname: {
        urlHostname: string;
        excludeExactHostname?: boolean | null;
    };
    modifiedOn: string;
    comment?: string | null;
} | {
    id: string;
    createdOn: string;
    modifiedOn: string;
    redirect: {
        sourceUrl: string;
        targetUrl: string;
        includeSubdomains?: boolean | null;
        preservePathSuffix?: boolean | null;
        preserveQueryString?: boolean | null;
        statusCode?: "301" | "302" | "307" | "308" | null;
        subpathMatching?: boolean | null;
    };
    comment?: string | null;
} | {
    id: string;
    asn: number;
    createdOn: string;
    modifiedOn: string;
    comment?: string | null;
};
export declare const GetListItemResponse: Schema.Schema<GetListItemResponse>;
export type GetListItemError = DefaultErrors;
export declare const getListItem: API.OperationMethod<GetListItemRequest, GetListItemResponse, GetListItemError, Credentials | HttpClient.HttpClient>;
export interface ListListItemsRequest {
    listId: string;
    /** Path param: The Account ID for this resource. */
    accountId: string;
    cursor?: string;
    /** Query param: Amount of results to include in each paginated response. A non-negative 32 bit integer. */
    perPage?: number;
    /** Query param: A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and  */
    search?: string;
}
export declare const ListListItemsRequest: Schema.Schema<ListListItemsRequest>;
export interface ListListItemsResponse {
    result: ({
        id: string;
        createdOn: string;
        ip: string;
        modifiedOn: string;
        comment?: string | null;
    } | {
        id: string;
        createdOn: string;
        hostname: {
            urlHostname: string;
            excludeExactHostname?: boolean | null;
        };
        modifiedOn: string;
        comment?: string | null;
    } | {
        id: string;
        createdOn: string;
        modifiedOn: string;
        redirect: {
            sourceUrl: string;
            targetUrl: string;
            includeSubdomains?: boolean | null;
            preservePathSuffix?: boolean | null;
            preserveQueryString?: boolean | null;
            statusCode?: "301" | "302" | "307" | "308" | null;
            subpathMatching?: boolean | null;
        };
        comment?: string | null;
    } | {
        id: string;
        asn: number;
        createdOn: string;
        modifiedOn: string;
        comment?: string | null;
    })[];
    resultInfo?: {
        cursors?: {
            after?: string | null;
        } | null;
    } | null;
}
export declare const ListListItemsResponse: Schema.Schema<ListListItemsResponse>;
export type ListListItemsError = DefaultErrors;
export declare const listListItems: API.PaginatedOperationMethod<ListListItemsRequest, ListListItemsResponse, ListListItemsError, Credentials | HttpClient.HttpClient>;
export interface CreateListItemRequest {
    listId: string;
    /** Path param: The Account ID for this resource. */
    accountId: string;
    /** Body param: */
    body: ({
        ip: string;
        comment?: string;
    } | {
        redirect: {
            sourceUrl: string;
            targetUrl: string;
            includeSubdomains?: boolean;
            preservePathSuffix?: boolean;
            preserveQueryString?: boolean;
            statusCode?: "301" | "302" | "307" | "308";
            subpathMatching?: boolean;
        };
        comment?: string;
    } | {
        hostname: {
            urlHostname: string;
            excludeExactHostname?: boolean;
        };
        comment?: string;
    } | {
        asn: number;
        comment?: string;
    })[];
}
export declare const CreateListItemRequest: Schema.Schema<CreateListItemRequest>;
export interface CreateListItemResponse {
    /** The unique operation ID of the asynchronous action. */
    operationId: string;
}
export declare const CreateListItemResponse: Schema.Schema<CreateListItemResponse>;
export type CreateListItemError = DefaultErrors;
export declare const createListItem: API.OperationMethod<CreateListItemRequest, CreateListItemResponse, CreateListItemError, Credentials | HttpClient.HttpClient>;
export interface UpdateListItemRequest {
    listId: string;
    /** Path param: The Account ID for this resource. */
    accountId: string;
    /** Body param: */
    body: ({
        ip: string;
        comment?: string;
    } | {
        redirect: {
            sourceUrl: string;
            targetUrl: string;
            includeSubdomains?: boolean;
            preservePathSuffix?: boolean;
            preserveQueryString?: boolean;
            statusCode?: "301" | "302" | "307" | "308";
            subpathMatching?: boolean;
        };
        comment?: string;
    } | {
        hostname: {
            urlHostname: string;
            excludeExactHostname?: boolean;
        };
        comment?: string;
    } | {
        asn: number;
        comment?: string;
    })[];
}
export declare const UpdateListItemRequest: Schema.Schema<UpdateListItemRequest>;
export interface UpdateListItemResponse {
    /** The unique operation ID of the asynchronous action. */
    operationId: string;
}
export declare const UpdateListItemResponse: Schema.Schema<UpdateListItemResponse>;
export type UpdateListItemError = DefaultErrors;
export declare const updateListItem: API.OperationMethod<UpdateListItemRequest, UpdateListItemResponse, UpdateListItemError, Credentials | HttpClient.HttpClient>;
export interface DeleteListItemRequest {
    listId: string;
    /** Path param: The Account ID for this resource. */
    accountId: string;
    /** Body param: */
    items?: {
        id: string;
    }[];
}
export declare const DeleteListItemRequest: Schema.Schema<DeleteListItemRequest>;
export interface DeleteListItemResponse {
    /** The unique operation ID of the asynchronous action. */
    operationId: string;
}
export declare const DeleteListItemResponse: Schema.Schema<DeleteListItemResponse>;
export type DeleteListItemError = DefaultErrors;
export declare const deleteListItem: API.OperationMethod<DeleteListItemRequest, DeleteListItemResponse, DeleteListItemError, Credentials | HttpClient.HttpClient>;
//# sourceMappingURL=rules.d.ts.map