/**
 * Copyright (C) 2024 Hedera Hashgraph, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the ""License"");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an ""AS IS"" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
import { type AccountManager } from '../../core/account_manager.js';
import { type ConfigManager } from '../../core/config_manager.js';
import { type KeyManager } from '../../core/key_manager.js';
import { type ProfileManager } from '../../core/profile_manager.js';
import { type PlatformInstaller } from '../../core/platform_installer.js';
import { type K8 } from '../../core/k8.js';
import { type ChartManager } from '../../core/chart_manager.js';
import { type CertificateManager } from '../../core/certificate_manager.js';
import { Task } from '../../core/task.js';
import { type SoloLogger } from '../../core/logging.js';
import type { Listr, ListrTaskWrapper } from 'listr2';
import { type ConfigBuilder, type NodeAlias, type NodeAliases, type PodName, type SkipCheck } from '../../types/aliases.js';
import { NodeStatusCodes, NodeSubcommandType } from '../../core/enumerations.js';
import { type Lease } from '../../core/lease/lease.js';
import { type BaseCommand } from '../base.js';
export declare class NodeCommandTasks {
    private readonly accountManager;
    private readonly configManager;
    private readonly keyManager;
    private readonly profileManager;
    private readonly platformInstaller;
    private readonly logger;
    private readonly k8;
    private readonly parent;
    private readonly chartManager;
    private readonly certificateManager;
    private readonly prepareValuesFiles;
    constructor(opts: {
        logger: SoloLogger;
        accountManager: AccountManager;
        configManager: ConfigManager;
        k8: K8;
        platformInstaller: PlatformInstaller;
        keyManager: KeyManager;
        profileManager: ProfileManager;
        chartManager: ChartManager;
        certificateManager: CertificateManager;
        parent: BaseCommand;
    });
    private _prepareUpgradeZip;
    private _uploadUpgradeZip;
    _uploadPlatformSoftware(nodeAliases: NodeAliases, podNames: any, task: ListrTaskWrapper<any, any, any>, localBuildPath: string): Listr<any, any, any>;
    _fetchPlatformSoftware(nodeAliases: NodeAliases, podNames: Record<NodeAlias, PodName>, releaseTag: string, task: ListrTaskWrapper<any, any, any>, platformInstaller: PlatformInstaller): Listr<any, any, any>;
    _checkNodeActivenessTask(ctx: any, task: ListrTaskWrapper<any, any, any>, nodeAliases: NodeAliases, status?: NodeStatusCodes): Listr<any, any, any>;
    _checkNetworkNodeActiveness(namespace: string, nodeAlias: NodeAlias, task: ListrTaskWrapper<any, any, any>, title: string, index: number, status?: NodeStatusCodes, maxAttempts?: number, delay?: number, timeout?: number): Promise<`network-node${number}-0`>;
    /** Return task for check if node proxies are ready */
    _checkNodesProxiesTask(ctx: any, task: ListrTaskWrapper<any, any, any>, nodeAliases: NodeAliases): Listr<any, any, any>;
    /**
     * When generating multiple all aliases are read from config.nodeAliases,
     * When generating a single key the alias in config.nodeAlias is used
     */
    _generateGossipKeys(generateMultiple: boolean): Task;
    /**
     * When generating multiple all aliases are read from config.nodeAliases,
     * When generating a single key the alias in config.nodeAlias is used
     */
    _generateGrpcTlsKeys(generateMultiple: boolean): Task;
    copyGrpcTlsCertificates(): Task;
    _addStake(namespace: string, accountId: string, nodeAlias: NodeAlias, stakeAmount?: number): Promise<void>;
    prepareUpgradeZip(): Task;
    loadAdminKey(): Task;
    checkExistingNodesStakedAmount(): Task;
    sendPrepareUpgradeTransaction(): Task;
    sendFreezeUpgradeTransaction(): Task;
    /** Download generated config files and key files from the network node */
    downloadNodeGeneratedFiles(): Task;
    taskCheckNetworkNodePods(ctx: any, task: ListrTaskWrapper<any, any, any>, nodeAliases: NodeAliases, maxAttempts?: any): Listr;
    /** Check if the network node pod is running */
    checkNetworkNodePod(namespace: string, nodeAlias: NodeAlias, maxAttempts?: number, delay?: number): Promise<`network-node${number}-0`>;
    identifyExistingNodes(): Task;
    uploadStateFiles(skip: SkipCheck | boolean): Task;
    identifyNetworkPods(maxAttempts?: any): Task;
    fetchPlatformSoftware(aliasesField: string): Task;
    populateServiceMap(): Task;
    setupNetworkNodes(nodeAliasesProperty: string, isGenesis?: boolean): Task;
    /**
     * Generate genesis network json file
     * @private
     * @param namespace - namespace
     * @param nodeAliases - node aliases
     * @param keysDir - keys directory
     * @param stagingDir - staging directory
     */
    private generateGenesisNetworkJson;
    prepareStagingDirectory(nodeAliasesProperty: any): Task;
    startNodes(nodeAliasesProperty: string): Task;
    enablePortForwarding(): Task;
    checkAllNodesAreActive(nodeAliasesProperty: string): Task;
    checkAllNodesAreFrozen(nodeAliasesProperty: string): Task;
    checkNodeProxiesAreActive(): Task;
    checkAllNodeProxiesAreActive(): Task;
    triggerStakeWeightCalculate(transactionType: NodeSubcommandType): Task;
    addNodeStakes(): Task;
    stakeNewNode(): Task;
    stopNodes(): Task;
    finalize(): Task;
    dumpNetworkNodesSaveState(): Task;
    getNodeLogsAndConfigs(): Task;
    getNodeStateFiles(): Task;
    checkPVCsEnabled(): Task;
    determineNewNodeAccountNumber(): Task;
    generateGossipKeys(): Task;
    generateGossipKey(): Task;
    generateGrpcTlsKeys(): Task;
    generateGrpcTlsKey(): Task;
    loadSigningKeyCertificate(): Task;
    computeMTLSCertificateHash(): Task;
    prepareGossipEndpoints(): Task;
    refreshNodeList(): Task;
    prepareGrpcServiceEndpoints(): Task;
    sendNodeUpdateTransaction(): Task;
    copyNodeKeysToSecrets(): Task;
    updateChartWithConfigMap(title: string, transactionType: NodeSubcommandType, skip?: SkipCheck | boolean): Task;
    saveContextData(argv: any, targetFile: string, parser: any): Task;
    loadContextData(argv: any, targetFile: string, parser: any): Task;
    killNodes(): Task;
    killNodesAndUpdateConfigMap(): Task;
    checkNodePodsAreRunning(): Task;
    sleep(title: string, milliseconds: number): Task;
    downloadLastState(): Task;
    uploadStateToNewNode(): Task;
    sendNodeDeleteTransaction(): Task;
    sendNodeCreateTransaction(): Task;
    initialize(argv: any, configInit: ConfigBuilder, lease: Lease | null, shouldLoadNodeClient?: boolean): Task;
}
