import { PayloadAction } from '@reduxjs/toolkit';
import { IComponentTemplate, OrNull } from '@ws-ui/shared';
import { AppState } from '..';
import { ITemplatedGroup, ITemplatedGroupItem } from './types';
export declare const fetchTemplates: import('@reduxjs/toolkit').AsyncThunk<ITemplatedGroup[], void, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const fetchTemplate: import('@reduxjs/toolkit').AsyncThunk<ITemplatedGroupItem[], {
    name: string;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const fetchCraftedComponents: import('@reduxjs/toolkit').AsyncThunk<any, void, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const addCraftedComponent: import('@reduxjs/toolkit').AsyncThunk<undefined, IComponentTemplate, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const editCraftedComponent: import('@reduxjs/toolkit').AsyncThunk<undefined, {
    id: string;
    changes: Partial<IComponentTemplate>;
}, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const removeCraftedComponent: import('@reduxjs/toolkit').AsyncThunk<undefined, string, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
type TDatasourcesReturnType = {
    path: string;
    namespace: string;
    list: datasources.ICreateDataSource[];
};
type TAddDatasource = {
    datasource: datasources.ICreateDataSource;
    path: string;
};
export declare const addDatasource: import('@reduxjs/toolkit').AsyncThunk<TDatasourcesReturnType | undefined, TAddDatasource, {
    state: AppState;
    dispatch: import('redux').Dispatch;
    extra: unknown;
    rejectValue: string;
    serializedErrorType: unknown;
    pendingMeta: unknown;
    fulfilledMeta: unknown;
    rejectedMeta: unknown;
}>;
type TEditDatasourceProperty = {
    id: string;
    path: string;
    value: any;
    property: string;
    namespace: string;
    updateRefs?: boolean;
};
type TEditDatasourceProperties = {
    id: string;
    path: string;
    changes: Record<string, any>;
    namespace: string;
    updateRefs?: boolean;
};
type TEditDatasource = TEditDatasourceProperty | TEditDatasourceProperties;
export declare const editDatasource: import('@reduxjs/toolkit').AsyncThunk<TDatasourcesReturnType | undefined, TEditDatasource, {
    state: AppState;
    dispatch: import('redux').Dispatch;
    extra: unknown;
    rejectValue: string;
    serializedErrorType: unknown;
    pendingMeta: unknown;
    fulfilledMeta: unknown;
    rejectedMeta: unknown;
}>;
export declare const isRenameDatasource: (action: PayloadAction<any>) => action is PayloadAction<TRenameDatasource>;
type TRenameDatasource = {
    id: string;
    path: string;
    new_name: string;
    namespace: string;
    updateRefs: boolean;
};
export declare const renameDatasource: import('@reduxjs/toolkit').AsyncThunk<OrNull<TDatasourcesReturnType>, TRenameDatasource, {
    state: AppState;
    dispatch: import('redux').Dispatch;
    extra: unknown;
    rejectValue: string;
    serializedErrorType: unknown;
    pendingMeta: unknown;
    fulfilledMeta: unknown;
    rejectedMeta: unknown;
}>;
type TDeleteDatasource = {
    path: string;
    id: string;
    namespace: string;
};
export declare const deleteDatasource: import('@reduxjs/toolkit').AsyncThunk<OrNull<TDatasourcesReturnType>, TDeleteDatasource, {
    state: AppState;
    dispatch: import('redux').Dispatch;
    extra: unknown;
    rejectValue: string;
    serializedErrorType: unknown;
    pendingMeta: unknown;
    fulfilledMeta: unknown;
    rejectedMeta: unknown;
}>;
export {};
