/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import type { Cluster } from "../../common/cluster/cluster";
import type { Patch } from "rfc6902";
import type { EmitAppEvent } from "../../common/app-event-bus/emit-event.injectable";
import type { Logger } from "@openlens/logger";
import type { WriteFile } from "../../common/fs/write-file.injectable";
import type { RemovePath } from "../../common/fs/remove.injectable";
import type { ExecFile } from "../../common/fs/exec-file.injectable";
import type { JoinPaths } from "../../common/path/join-paths.injectable";
import type { CreateKubectl } from "../kubectl/create-kubectl.injectable";
import type { KubeconfigManager } from "../kubeconfig-manager/kubeconfig-manager";
import type { AsyncResult } from "@openlens/utilities";
export interface ResourceApplierDependencies {
    emitAppEvent: EmitAppEvent;
    writeFile: WriteFile;
    deleteFile: RemovePath;
    execFile: ExecFile;
    joinPaths: JoinPaths;
    createKubectl: CreateKubectl;
    readonly proxyKubeconfigManager: KubeconfigManager;
    readonly logger: Logger;
}
export declare class ResourceApplier {
    protected readonly dependencies: ResourceApplierDependencies;
    protected readonly cluster: Cluster;
    constructor(dependencies: ResourceApplierDependencies, cluster: Cluster);
    private getKubectlPath;
    /**
     * Patch a kube resource's manifest, throwing any error that occurs.
     * @param name The name of the kube resource
     * @param kind The kind of the kube resource
     * @param patch The list of JSON operations
     * @param ns The optional namespace of the kube resource
     */
    patch(name: string, kind: string, patch: Patch, ns?: string): Promise<string>;
    create(resource: string): AsyncResult<string, string>;
    protected kubectlApply(content: string): AsyncResult<string, string>;
    kubectlApplyAll(resources: string[], extraArgs?: string[]): AsyncResult<string, string>;
    kubectlDeleteAll(resources: string[], extraArgs?: string[]): AsyncResult<string, string>;
    protected kubectlCmdAll(subCmd: string, resources: string[], parentArgs?: string[]): AsyncResult<string, string>;
    protected sanitizeObject(resource: string): string;
}
