import {ActionContext, ActionTree, GetterTree, Module, MutationTree, Store} from 'vuex'; export declare global { interface RootStoreState { common: CommonStoreState; layout: LayoutStoreState; node: NodeStoreState; project: ProjectStoreState; spider: SpiderStoreState; task: TaskStoreState; file: FileStoreState; tag: TagStoreState; dataCollection: DataCollectionStoreState; schedule: ScheduleStoreState; user: UserStoreState; token: TokenStoreState; plugin: PluginStoreState; git: GitStoreState; notification: NotificationStoreState; ds: DataSourceStoreState; environment: EnvironmentStoreState; system: SystemStoreState; } type StoreGetter = (state: S, getters: GetterTree, rootState: R, rootGetters: any) => T; type StoreMutation = (state: S, payload: P) => void; type StoreActionHandler = (this: Store, ctx: ActionContext, payload?: P) => T; interface StoreActionObject { root?: boolean; handler: StoreActionHandler; } type StoreAction = StoreActionHandler | StoreActionObject; interface BaseModule extends Module { getters: G; mutations: M; actions: A; } interface BaseStoreState { ns: StoreNamespace; dialogVisible: DialogVisible; activeDialogKey: DialogKey | undefined; createEditDialogTabName: CreateEditTabName; form: T; isSelectiveForm: boolean; selectedFormFields: string[]; readonlyFormFields: string[]; formList: T[]; newFormFn: DefaultFormFunc; confirmLoading: boolean; tableData: TableData; tableTotal: number; tablePagination: TablePagination; tableListFilter: FilterConditionData[]; tableListSort: SortData[]; allList: T[]; sidebarCollapsed: boolean; actionsCollapsed: boolean; tabs: NavItem[]; afterSave: (() => Promise)[]; } interface BaseStoreGetters extends GetterTree { dialogVisible: StoreGetter; isBatchForm: StoreGetter; formListIds: StoreGetter; allListSelectOptions: StoreGetter; allDict: StoreGetter>; tabName: StoreGetter; allTags: StoreGetter; tabs: StoreGetter; } interface BaseStoreMutations extends MutationTree> { showDialog: StoreMutation, DialogKey>; hideDialog: StoreMutation>; setCreateEditDialogTabName: StoreMutation, CreateEditTabName>; resetCreateEditDialogTabName: StoreMutation>; setForm: StoreMutation, T>; resetForm: StoreMutation>; setIsSelectiveForm: StoreMutation, boolean>; setSelectedFormFields: StoreMutation, string[]>; resetSelectedFormFields: StoreMutation>; setReadonlyFormFields: StoreMutation, string[]>; resetReadonlyFormFields: StoreMutation>; setFormList: StoreMutation, T[]>; resetFormList: StoreMutation>; setConfirmLoading: StoreMutation, boolean>; setTableData: StoreMutation, TableDataWithTotal>; resetTableData: StoreMutation>; setTablePagination: StoreMutation, TablePagination>; resetTablePagination: StoreMutation>; setTableListFilter: StoreMutation, FilterConditionData[]>; resetTableListFilter: StoreMutation>; setTableListFilterByKey: StoreMutation, { key: string; conditions: FilterConditionData[] }>; resetTableListFilterByKey: StoreMutation, string>; setTableListSort: StoreMutation, SortData[]>; resetTableListSort: StoreMutation>; setTableListSortByKey: StoreMutation, { key: string; sort: SortData }>; resetTableListSortByKey: StoreMutation, string>; setAllList: StoreMutation, T[]>; resetAllList: StoreMutation>; expandSidebar: StoreMutation>; collapseSidebar: StoreMutation>; expandActions: StoreMutation>; collapseActions: StoreMutation>; setTabs: StoreMutation; setAfterSave: StoreMutation, (() => Promise)[]>; } interface BaseStoreActions extends ActionTree, R> { getById: StoreAction, string>; create: StoreAction, T>; updateById: StoreAction, { id: string; form: T }>; deleteById: StoreAction, string>; getList: StoreAction>; getListWithParams: StoreAction, ListRequestParams>; getAllList: StoreAction>; createList: StoreAction, T[]>; updateList: StoreAction, BatchRequestPayloadWithData>; deleteList: StoreAction, BatchRequestPayload>; } type StoreActionContext = ActionContext; type StoreNamespace = 'layout' | 'node' | 'project' | 'spider' | 'task' | 'schedule' | 'file' | 'tag' | 'dataCollection' | 'user' | 'token' | 'plugin' | 'git' | 'notification' | 'ds' | 'environment'; type ListStoreNamespace = 'node' | 'project' | 'spider' | 'task' | 'tag' | 'dataCollection' | 'schedule' | 'user' | 'token' | 'plugin' | 'git' | 'notification' | 'ds' | 'environment'; interface StoreContext { namespace: StoreNamespace; store: Store; state: BaseStoreState; } interface ListStoreContext extends StoreContext { namespace: ListStoreNamespace; state: R[ListStoreNamespace]; } type DetailStoreContext = ListStoreContext; interface GetDefaultStoreGettersOptions { selectOptionValueKey?: string; selectOptionLabelKey?: string; } }