UNPKG

gitdb-database

Version:

A production-ready CLI tool for managing a NoSQL database using GitHub repositories as storage

30 lines 930 B
import { DatabaseConfig } from './database.js'; export interface Session { name: string; token: string; owner: string; repo: string; branch?: string; createdAt: string; lastUsed: string; } declare class SessionManager { private sessions; private currentSession; private configPath; constructor(); private loadSessions; private saveSessions; createSession(name: string, config: DatabaseConfig, branch?: string): Session; getSession(name: string): Session | null; getCurrentSession(): Session | null; switchSession(name: string): boolean; listSessions(): Session[]; deleteSession(name: string): boolean; getSessionConfig(name: string): DatabaseConfig | null; connectAs(name: string, token: string): Promise<void>; clearAllSessions(): void; } export declare const sessionManager: SessionManager; export {}; //# sourceMappingURL=sessions.d.ts.map