import { GraphQLSchema } from 'graphql';
import { LaboratoryPermission, LaboratoryPermissions } from '../components/laboratory/context';
import { LaboratoryCollectionsActions, LaboratoryCollectionsState } from './collections';
import { LaboratoryEnv, LaboratoryEnvActions, LaboratoryEnvState } from './env';
import { LaboratoryPluginsActions, LaboratoryPluginsState } from './plugins';
import { LaboratoryPreflightActions, LaboratoryPreflightState } from './preflight';
import { LaboratorySettingsActions, LaboratorySettingsState } from './settings';
import { LaboratoryTabsActions, LaboratoryTabsState } from './tabs';
export interface LaboratoryOperation {
    id: string;
    name: string;
    query: string;
    variables: string;
    headers: string;
    extensions: string;
}
export interface LaboratoryOperationsState {
    operations: LaboratoryOperation[];
    activeOperation: LaboratoryOperation | null;
}
export interface LaboratoryOperationsActions {
    setActiveOperation: (operationId: string) => void;
    addOperation: (operation: Omit<LaboratoryOperation, 'id'> & {
        id?: string;
    }) => LaboratoryOperation;
    setOperations: (operations: LaboratoryOperation[]) => void;
    updateActiveOperation: (operation: Partial<Omit<LaboratoryOperation, 'id'>>) => void;
    deleteOperation: (operationId: string) => void;
    addPathToActiveOperation: (path: string) => void;
    deletePathFromActiveOperation: (path: string) => void;
    addArgToActiveOperation: (path: string, argName: string, schema: GraphQLSchema) => void;
    deleteArgFromActiveOperation: (path: string, argName: string) => void;
    runActiveOperation: (endpoint: string, options?: {
        env?: LaboratoryEnv;
        headers?: Record<string, string>;
        onResponse?: (response: string) => void;
    }) => Promise<Response | null>;
    stopActiveOperation: (() => void) | null;
    isActiveOperationLoading: boolean;
    isOperationLoading: (operationId: string) => boolean;
    isOperationSubscription: (operation: LaboratoryOperation) => boolean;
    isActiveOperationSubscription: boolean;
}
export interface LaboratoryOperationsCallbacks {
    onOperationCreate?: (operation: LaboratoryOperation) => void;
    onOperationUpdate?: (operation: LaboratoryOperation) => void;
    onOperationDelete?: (operation: LaboratoryOperation) => void;
}
export declare const useOperations: (props: {
    checkPermissions: (permission: `${keyof LaboratoryPermissions & string}:${keyof LaboratoryPermission & string}`) => boolean;
    defaultOperations?: LaboratoryOperation[];
    defaultActiveOperationId?: string;
    onOperationsChange?: (operations: LaboratoryOperation[]) => void;
    onActiveOperationIdChange?: (operationId: string) => void;
    collectionsApi?: LaboratoryCollectionsState & LaboratoryCollectionsActions;
    tabsApi?: LaboratoryTabsState & LaboratoryTabsActions;
    envApi?: LaboratoryEnvState & LaboratoryEnvActions;
    preflightApi?: LaboratoryPreflightState & LaboratoryPreflightActions;
    settingsApi?: LaboratorySettingsState & LaboratorySettingsActions;
    pluginsApi?: LaboratoryPluginsState & LaboratoryPluginsActions;
} & LaboratoryOperationsCallbacks) => LaboratoryOperationsState & LaboratoryOperationsActions;
