@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
22 lines (21 loc) • 986 B
TypeScript
import type { List } from "../../interfaces/models/List";
/**
* Redux-powered hook that provides all lists actions
* This replaces the individual hooks and provides a centralized way to manage lists
*/
export declare function useListsActions(): {
openList: (list: List) => void;
goBack: () => void;
goToRoot: () => void;
fetchRootList: (projectId: string) => Promise<void>;
fetchSubLists: (projectId: string, listId: string) => Promise<void>;
createList: (projectId: string, parentListId: string, listName: string) => Promise<void>;
updateList: (projectId: string, listId: string, update: Partial<{
name: string;
}>) => Promise<void>;
deleteList: (projectId: string, list: List) => Promise<void>;
addToList: (projectId: string, listId: string, entityId: string) => Promise<void>;
removeFromList: (projectId: string, listId: string, entityId: string) => Promise<void>;
resetLists: () => void;
};
export default useListsActions;