import { ActionThunk } from '../Core/WdkMiddleware'; import { Favorite, RecordClass } from '../Utils/WdkModel'; import { ServiceError } from '../Service/ServiceError'; declare type TableState = {}; export declare type Action = SortTableAction | StartFavoritesRequestAction | EndFavoritesRequestWithErrorAction | EndFavoritesRequestWithSucessAction | UpdateTableStateAction | UpdateTableSelectionAction | CreateTypeGetterAction | EditCellAction | ChangeCellValueAction | StartSaveCellDataAction | EndSaveCellWithErrorAction | EndSaveCellWithSuccessAction | CancelCellEditAction | StartDeleteAction | StartUndeleteAction | EndAddWithSuccessAction | EndAddWithErrorAction | EndDeleteWithErrorAction | EndUndeleteWithSuccessAction | UpdateSearchTermAction | FilterByTypeAction; export declare const UPDATE_TABLE_STATE = "favorites/update-table-state"; export interface UpdateTableStateAction { type: typeof UPDATE_TABLE_STATE; payload: { tableState: TableState; }; } export declare function updateTableState(tableState: TableState): UpdateTableStateAction; export declare const SORT_TABLE = "favorites/sort-table"; export interface SortTableAction { type: typeof SORT_TABLE; payload: { sortKey: string; sortDirection: 'ASC' | 'DESC'; }; } export declare function sortTable(sortKey: string, sortDirection: 'ASC' | 'DESC'): SortTableAction; export declare const UPDATE_TABLE_SELECTION = "favorites/update-table-selection"; export interface UpdateTableSelectionAction { type: typeof UPDATE_TABLE_SELECTION; payload: { selectIds: number[]; deselectIds: number[]; }; } export declare function updateTableSelection(payload: UpdateTableSelectionAction['payload']): UpdateTableSelectionAction; export declare const TYPE_GETTER = "favorites/create-type-getter"; export interface CreateTypeGetterAction { type: typeof TYPE_GETTER; payload: { recordClasses: RecordClass[]; }; } export declare function createTypeGetter(recordClasses: RecordClass[]): CreateTypeGetterAction; export declare const START_FAVORITES_REQUEST = "favorites/start-request"; export interface StartFavoritesRequestAction { type: typeof START_FAVORITES_REQUEST; } export declare function startFavoritesRequest(): StartFavoritesRequestAction; export declare const END_FAVORITES_REQUEST_WITH_ERROR = "favorites/end-request-with-error"; export interface EndFavoritesRequestWithErrorAction { type: typeof END_FAVORITES_REQUEST_WITH_ERROR; payload: { error: ServiceError; }; } export declare function endFavoritesRequestWithError(error: ServiceError): EndFavoritesRequestWithErrorAction; export declare const END_FAVORITES_REQUEST_WITH_SUCCESS = "favorites/end-request-with-success"; export interface EndFavoritesRequestWithSucessAction { type: typeof END_FAVORITES_REQUEST_WITH_SUCCESS; payload: { tableState: TableState; }; } export declare function endFavoritesRequestWithSucess(tableState: TableState): EndFavoritesRequestWithSucessAction; export declare const EDIT_CELL = "favorites/edit-cell"; export interface EditCellAction { type: typeof EDIT_CELL; payload: { coordinates: {}; key: string; value: string; rowData: Favorite; }; } export declare function editCell(payload: EditCellAction['payload']): EditCellAction; export declare const CHANGE_CELL_VALUE = "favorites/change-cell-value"; export interface ChangeCellValueAction { type: typeof CHANGE_CELL_VALUE; payload: string; } export declare function changeCellValue(value: string): ChangeCellValueAction; export declare const START_SAVE_CELL_DATA = "favorites/start-save-cell-data"; export interface StartSaveCellDataAction { type: typeof START_SAVE_CELL_DATA; } export declare function startSaveCellData(): StartSaveCellDataAction; export declare const END_SAVE_CELL_WITH_SUCCESS = "favorites/end-save-cell-with-success"; export interface EndSaveCellWithSuccessAction { type: typeof END_SAVE_CELL_WITH_SUCCESS; payload: { tableState: TableState; }; } export declare function endSaveCellWithSuccess(tableState: TableState): EndSaveCellWithSuccessAction; export declare const END_SAVE_CELL_WITH_ERROR = "favorites/end-save-cell-with-error"; export interface EndSaveCellWithErrorAction { type: typeof END_SAVE_CELL_WITH_ERROR; payload: { error: ServiceError; }; } export declare function endSaveCellWithError(error: ServiceError): EndSaveCellWithErrorAction; export declare const CANCEL_CELL_EDIT = "favorites/cancel-cell-edit"; export interface CancelCellEditAction { type: typeof CANCEL_CELL_EDIT; } export declare function cancelCellEdit(): CancelCellEditAction; export declare const START_DELETE = "favorites/start-delete"; export interface StartDeleteAction { type: typeof START_DELETE; } export declare function startDelete(): StartDeleteAction; export declare const END_DELETE_WITH_ERROR = "favorites/end-delete-with-error"; export interface EndDeleteWithErrorAction { type: typeof END_DELETE_WITH_ERROR; payload: { error: ServiceError; }; } export declare function endDeleteWithError(error: ServiceError): EndDeleteWithErrorAction; export declare const START_UNDELETE = "favorites/start-undelete"; export interface StartUndeleteAction { type: typeof START_UNDELETE; } export declare function startUndelete(): StartUndeleteAction; export declare const END_UNDELETE_WITH_SUCCESS = "favorites/end-undelete-with-success"; export interface EndUndeleteWithSuccessAction { type: typeof END_UNDELETE_WITH_SUCCESS; payload: { undeletedFavorites: Favorite[]; }; } export declare function endUndeleteWithSuccess(undeletedFavorites: Favorite[]): EndUndeleteWithSuccessAction; export declare const END_ADD_WITH_SUCCESS = "favorites/end-add-with-success"; export interface EndAddWithSuccessAction { type: typeof END_ADD_WITH_SUCCESS; payload: { addedFavorite: Favorite; }; } export declare function endAddWithSuccess(addedFavorite: Favorite): EndAddWithSuccessAction; export declare const END_ADD_WITH_ERROR = "favorites/end-add-with-error"; export interface EndAddWithErrorAction { type: typeof END_ADD_WITH_ERROR; payload: { error: ServiceError; }; } export declare function endAddWithError(error: ServiceError): EndAddWithErrorAction; export declare const UPDATE_SEARCH_TERM = "favorites/update-search-term"; export interface UpdateSearchTermAction { type: typeof UPDATE_SEARCH_TERM; payload: string; } export declare function updateSearchTerm(searchTerm: string): UpdateSearchTermAction; export declare const FILTER_BY_TYPE = "favorites/filter-by-type"; export interface FilterByTypeAction { type: typeof FILTER_BY_TYPE; payload: string | null; } export declare function filterByType(typeName: string | null): FilterByTypeAction; declare type ListAction = StartFavoritesRequestAction | EndFavoritesRequestWithSucessAction | EndFavoritesRequestWithErrorAction | UpdateTableStateAction; declare type SaveAction = StartSaveCellDataAction | EndSaveCellWithSuccessAction | EndSaveCellWithErrorAction | UpdateTableStateAction; declare type DeleteAction = StartDeleteAction | EndDeleteWithErrorAction | UpdateTableStateAction; declare type AddAction = StartUndeleteAction | EndAddWithErrorAction | UpdateTableStateAction; export declare function loadFavoritesList(): ActionThunk; export declare function saveCellData(tableState: {}, updatedFavorite: Favorite): ActionThunk; export declare function deleteFavorites(tableState: {}, deletedFavorites: Favorite[]): ActionThunk; export declare function undeleteFavorites(tableState: {}, undeletedFavorites: Favorite[]): ActionThunk; export {}; //# sourceMappingURL=FavoritesActions.d.ts.map