import type { Database } from 'sql.js';
import type { AppState, Bookmark, Folder, Group, User, UserPreferences, Workspace } from '@app/shared';
/**
 * Find a user by username
 * Note: Returns the password hash for authentication purposes
 */
export declare function findUserByUsername(db: Database, username: string): {
    id: string;
    username: string;
    password: string;
    theme: string;
    view_mode: string;
    bookmark_view_mode: string;
    bookmarks_per_container: number;
} | null;
/**
 * Get user by ID without password hash
 */
export declare function getUserById(db: Database, userId: string): User | null;
/**
 * Create a new user with starter folder and group
 * @param password Should be a hashed password
 */
export declare function createUser(db: Database, username: string, password: string): User;
export declare function updatePreferences(db: Database, userId: string, patch: Partial<UserPreferences>): UserPreferences;
export declare function getState(db: Database, userId: string): AppState;
export declare function createWorkspace(db: Database, userId: string, title: string): Workspace;
export declare function updateWorkspace(db: Database, userId: string, workspaceId: string, title: string): Workspace;
export declare function deleteWorkspace(db: Database, userId: string, workspaceId: string): void;
export declare function reorderWorkspaces(db: Database, userId: string, orderedIds: string[]): void;
export declare function createFolder(db: Database, userId: string, workspaceId: string, title: string): Folder;
export declare function updateFolder(db: Database, userId: string, folderId: string, title: string): Folder;
export declare function deleteFolder(db: Database, userId: string, folderId: string): void;
export declare function reorderFolders(db: Database, userId: string, workspaceId: string, orderedIds: string[]): void;
export declare function moveFolderToWorkspace(db: Database, userId: string, folderId: string, workspaceId: string, orderedIds: string[]): void;
export declare function createGroup(db: Database, userId: string, folderId: string, title: string): Group;
export declare function updateGroup(db: Database, userId: string, groupId: string, title: string): Group;
export declare function deleteGroup(db: Database, userId: string, groupId: string): void;
export declare function reorderGroupsInFolder(db: Database, userId: string, folderId: string, orderedIds: string[]): void;
export declare function moveGroupToFolder(db: Database, userId: string, groupId: string, folderId: string, orderedIds: string[]): void;
export declare function createBookmark(db: Database, userId: string, groupId: string, data: {
    url: string;
    title: string;
    description: string;
    tags: string[];
}): Bookmark;
export declare function updateBookmark(db: Database, userId: string, bookmarkId: string, patch: Partial<{
    url: string;
    title: string;
    description: string;
    tags: string[];
}>): Bookmark;
export declare function deleteBookmark(db: Database, userId: string, bookmarkId: string): void;
export declare function reorderBookmarksInGroup(db: Database, userId: string, groupId: string, orderedIds: string[]): void;
export declare function moveBookmarkToGroup(db: Database, userId: string, bookmarkId: string, groupId: string, orderedIds: string[]): void;
