import { DBTokenResponse } from '../../core/types.js'; /** * Interface for authentication records */ export interface AuthenticationRecord { id: string; connectionId: string; service: string; token: DBTokenResponse; userInfo: { uniqueId: string; } | any; createdAt: Date; updatedAt: Date; } /** * Interface for session records */ export interface SessionRecord { id: string; packageId: string; name: string; description?: string; createdAt: Date; expiresAt: Date; connectedServices: Record; isDirectAuth: boolean; status: 'active' | 'expired' | 'completed'; } /** * Interface for connection records (previously deployments) */ export interface ConnectionRecord { id: string; name: string; description?: string; packageId: string; status: 'active' | 'inactive' | 'pending'; services: string[]; userId: string; createdAt: Date; updatedAt: Date; isDirectAuth: boolean; } /** * Interface for secret records */ export interface SecretRecord { id: string; connectionId: string; service: string; credentials: Record; createdAt: Date; updatedAt: Date; } /** * Interface for database adapters that store MCP authentication data */ export interface DatabaseAdapter { /** * Store an authentication record */ storeAuthentication(auth: Omit): Promise; /** * Update an authentication record */ updateAuthentication(connectionId: string, service: string, updates: Partial>): Promise; /** * Get authentication by connection and service */ getAuthentication(connectionId: string, service: string): Promise; /** * Get all authentications for a connection */ getAuthenticationsForConnection(connectionId: string): Promise; /** * Delete an authentication */ deleteAuthentication(id: string): Promise; /** * Store a session record */ storeSession(session: Omit): Promise; /** * Update a session record */ updateSession(id: string, updates: Partial>): Promise; /** * Get all sessions */ getSessions(): Promise; /** * Get a session by ID */ getSession(id: string): Promise; /** * Delete a session */ deleteSession(id: string): Promise; /** * Clean up expired sessions */ cleanupExpiredSessions(): Promise; /** * Store a connection record */ storeConnection(connection: Omit): Promise; /** * Update a connection record */ updateConnection(id: string, updates: Partial>): Promise; /** * Get a connection by ID */ getConnection(id: string): Promise; /** * Get all connections for a package */ getConnectionsForPackage(packageId: string): Promise; /** * Delete a connection */ deleteConnection(id: string): Promise; /** * Store a secret record */ storeSecret(secret: Omit): Promise; /** * Update a secret record */ updateSecret(id: string, updates: Partial>): Promise; /** * Get secrets for a connection */ getSecretsForConnection(connectionId: string): Promise; /** * Get secret by connection and service */ getSecret(connectionId: string, service: string): Promise; /** * Delete a secret */ deleteSecret(id: string): Promise; /** * Close the database connection */ close?(): Promise; } export type { DBTokenResponse, DeploymentInfo } from '../../core/types'; export { MemoryDatabaseAdapter } from './memory'; //# sourceMappingURL=index.d.ts.map