UNPKG

@hivetechs/hive-ai

Version:

Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API

59 lines 2.23 kB
/** * User Management Module * * Handles user identification, authentication, and device registration * Supports multi-device usage with secure local tracking */ /** * Initialize the user database */ export declare function initializeUserDatabase(): Promise<boolean>; /** * Get or create a user * This is the main entry point for user identification */ export declare function getOrCreateUser(email?: string, name?: string): Promise<any>; /** * Register a new device for an existing user */ export declare function registerNewDevice(userId: string, deviceName?: string): Promise<any>; /** * Get a secure machine ID * This creates a unique identifier for the current machine using built-in OS information */ export declare function getMachineId(): string; /** * Increment conversation count for the current user and installation */ export declare function incrementConversationCount(userId: string, installationId: string): Promise<boolean>; /** * Check if usage limits are exceeded for a user */ export declare function checkUsageLimits(userId: string): Promise<any>; /** * Get unsynchronized usage data for a user */ export declare function getUnsyncedUsageData(userId: string, since?: Date): Promise<any[]>; /** * Mark usage data as synchronized */ export declare function markUsageAsSynced(userId: string, records: any[]): Promise<boolean>; /** * Update user subscription information */ export declare function updateUserSubscription(userId: string, tier: string, gumroadCustomerId?: string, gumroadSubscriptionId?: string, gumroadProductId?: string, additionalCredits?: number, lemonSqueezyCustomerId?: string, // Legacy parameter, preserved for historical records lemonSqueezySubscriptionId?: string): Promise<boolean>; /** * List all devices registered to a user */ export declare function listUserDevices(userId: string): Promise<any[]>; /** * Deactivate a device */ export declare function deactivateDevice(userId: string, installationId: string): Promise<boolean>; /** * Execute a database query directly * This is used by the cloudSync module to access the database */ export declare function executeQuery(query: string, params?: any[]): Promise<any>; //# sourceMappingURL=userManager.d.ts.map