import * as k8s from "@kubernetes/client-node";
import { K8sDeleteResponse, K8sListResponse } from "./api";
import { KubernetesDeleteResourceRequest } from "./request";
/**
 * Delete a resource if it exists.  If the resource does not exist,
 * do nothing.
 *
 * @param spec Kuberenetes spec of resource to delete
 * @return DeleteResponse if object existed and was deleted, undefined if it did not exist
 */
export declare function deleteSpec(spec: k8s.KubernetesObject): Promise<K8sDeleteResponse | undefined>;
/** Collection deleter for namespaced resources. */
export declare type K8sNamespacedLister = (namespace: string, pretty?: string, allowWatchBookmarks?: boolean, continu?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, options?: any) => Promise<K8sListResponse>;
/** Collection deleter for cluster resources. */
export declare type K8sClusterLister = (pretty?: string, allowWatchBookmarks?: boolean, continu?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, options?: any) => Promise<K8sListResponse>;
/** Collection deleter for namespaced resources. */
export declare type K8sNamespacedDeleter = (name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, body?: k8s.V1DeleteOptions, options?: any) => Promise<K8sDeleteResponse>;
/** Collection deleter for cluster resources. */
export declare type K8sClusterDeleter = (name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, body?: k8s.V1DeleteOptions, options?: any) => Promise<K8sDeleteResponse>;
/** Arguments for [[deleteAppResources]]. */
export interface DeleteAppResourcesArgBase {
    /** Resource kind, e.g., "Service". */
    kind: string;
    /** Whether resource is cluster or namespace scoped. */
    namespaced: boolean;
    /** Delete request object. */
    req: KubernetesDeleteResourceRequest;
    /** API object to use as `this` for lister and deleter. */
    api: k8s.CoreV1Api | k8s.AppsV1Api | k8s.NetworkingV1beta1Api | k8s.RbacAuthorizationV1Api;
    /** Resource collection deleting function. */
    lister: K8sNamespacedLister | K8sClusterLister;
    /** Resource collection deleting function. */
    deleter: K8sNamespacedDeleter | K8sClusterDeleter;
}
export interface DeleteAppResourcesArgNamespaced extends DeleteAppResourcesArgBase {
    namespaced: true;
    lister: K8sNamespacedLister;
    deleter: K8sNamespacedDeleter;
}
export interface DeleteAppResourcesArgCluster extends DeleteAppResourcesArgBase {
    namespaced: false;
    lister: K8sClusterLister;
    deleter: K8sClusterDeleter;
}
export declare type DeleteAppResourcesArg = DeleteAppResourcesArgNamespaced | DeleteAppResourcesArgCluster;
/**
 * Delete resources associated with application described by `arg.req`, if
 * any exists.  If no matching resources exist, do nothing.  Return
 * ann array of deleted resources, which may be empty.
 *
 * @param arg Specification of what and how to delete for what application
 * @return Array of deleted resources
 */
export declare function deleteAppResources(arg: DeleteAppResourcesArg): Promise<k8s.KubernetesObject[]>;
//# sourceMappingURL=delete.d.ts.map