/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * 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 { TreeNodeData, TreeData } from '@finos/legend-art';
import type { EditorStore } from '../EditorStore.js';
import type { EditorSDLCState } from '../EditorSDLCState.js';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import { type Version, WorkflowJob, Workflow } from '@finos/legend-server-sdlc';
export declare abstract class WorkflowExplorerTreeNodeData implements TreeNodeData {
    isSelected?: boolean | undefined;
    isOpen?: boolean | undefined;
    id: string;
    label: string;
    childrenIds: string[] | undefined;
    constructor(id: string, label: string);
}
export declare class WorkflowTreeNodeData extends WorkflowExplorerTreeNodeData {
    workflow: Workflow;
    constructor(workflow: Workflow);
}
export declare class WorkflowJobTreeNodeData extends WorkflowExplorerTreeNodeData {
    workflowJob: WorkflowJob;
    constructor(workflowJob: WorkflowJob);
}
export declare class WorkflowLogState {
    readonly editorStore: EditorStore;
    readonly workflowManagerState: WorkflowManagerState;
    readonly fetchJobLogState: ActionState;
    job: WorkflowJob | undefined;
    logs: string;
    constructor(editorStore: EditorStore, workflowManagerState: WorkflowManagerState, job: WorkflowJob | undefined, logs: string | undefined);
    setLogs(val: string): void;
    setJob(val: WorkflowJob | undefined): void;
    closeModal(): void;
    refreshJobLogs(workflowJob: WorkflowJob): GeneratorFn<void>;
    viewJobLogs(workflowJob: WorkflowJob): GeneratorFn<void>;
}
export declare class WorkflowState {
    readonly uuid: string;
    readonly editorStore: EditorStore;
    readonly workflowManagerState: WorkflowManagerState;
    treeData: TreeData<WorkflowExplorerTreeNodeData>;
    isExecutingWorkflowRequest: boolean;
    constructor(editorStore: EditorStore, workflowManagerState: WorkflowManagerState, workflow: Workflow, jobs: WorkflowJob[] | undefined);
    setWorkflowTreeData(val: TreeData<WorkflowExplorerTreeNodeData>): void;
    buildTreeData(workflow: Workflow, jobs: WorkflowJob[] | undefined): TreeData<WorkflowExplorerTreeNodeData>;
    fetchAllWorkspaceWorkJobs(workflowId: string, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
    onTreeNodeSelect(node: WorkflowExplorerTreeNodeData, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
    cancelJob(workflowJob: WorkflowJob, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
    refreshWorkflow(workflowId: string, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
    retryJob(workflowJob: WorkflowJob, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
    runManualJob(workflowJob: WorkflowJob, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
}
export declare abstract class WorkflowManagerState {
    readonly editorStore: EditorStore;
    readonly sdlcState: EditorSDLCState;
    readonly fetchWorkflowsState: ActionState;
    logState: WorkflowLogState;
    workflowStates: WorkflowState[];
    constructor(editorStore: EditorStore, sdlcState: EditorSDLCState);
    abstract getWorkflows(): GeneratorFn<Workflow[]>;
    abstract getWorkflow(workflowId: string): GeneratorFn<Workflow>;
    abstract getJobs(workflowId: string): GeneratorFn<WorkflowJob[]>;
    abstract getJob(job: WorkflowJob): GeneratorFn<WorkflowJob[]>;
    abstract retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    abstract runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    abstract cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    abstract getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
    fetchAllWorkflows(): GeneratorFn<void>;
}
export declare class WorkspaceWorkflowManagerState extends WorkflowManagerState {
    getJobs(workflowId: string): GeneratorFn<WorkflowJob[]>;
    getJob(job: WorkflowJob): GeneratorFn<WorkflowJob[]>;
    getWorkflows(): GeneratorFn<Workflow[]>;
    getWorkflow(workflowId: string): GeneratorFn<Workflow>;
    retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
}
export declare class ProjectVersionWorkflowManagerState extends WorkflowManagerState {
    version: Version;
    constructor(editorStore: EditorStore, sdlcState: EditorSDLCState, version: Version);
    getJobs(workflowId: string): GeneratorFn<WorkflowJob[]>;
    getJob(job: WorkflowJob): GeneratorFn<WorkflowJob[]>;
    getWorkflows(): GeneratorFn<Workflow[]>;
    getWorkflow(workflowId: string): GeneratorFn<Workflow>;
    retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
}
export declare class ProjectWorkflowManagerState extends WorkflowManagerState {
    getJobs(workflowId: string): GeneratorFn<WorkflowJob[]>;
    getJob(job: WorkflowJob): GeneratorFn<WorkflowJob[]>;
    getWorkflows(): GeneratorFn<Workflow[]>;
    getWorkflow(workflowId: string): GeneratorFn<Workflow>;
    retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
    getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
}
//# sourceMappingURL=WorkflowManagerState.d.ts.map