Files
gt-ai-os-community/packages/utils/dist/database.d.ts
HackWeasel b9dfb86260 GT AI OS Community Edition v2.0.33
Security hardening release addressing CodeQL and Dependabot alerts:

- Fix stack trace exposure in error responses
- Add SSRF protection with DNS resolution checking
- Implement proper URL hostname validation (replaces substring matching)
- Add centralized path sanitization to prevent path traversal
- Fix ReDoS vulnerability in email validation regex
- Improve HTML sanitization in validation utilities
- Fix capability wildcard matching in auth utilities
- Update glob dependency to address CVE
- Add CodeQL suppression comments for verified false positives

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 17:04:45 -05:00

52 lines
1.6 KiB
TypeScript

/**
* Generate SQLite database path for tenant
*/
export declare function getTenantDatabasePath(tenantDomain: string, dataDir?: string): string;
/**
* Generate ChromaDB collection name for tenant
*/
export declare function getTenantChromaCollection(tenantDomain: string): string;
/**
* Generate Redis key prefix for tenant
*/
export declare function getTenantRedisPrefix(tenantDomain: string): string;
/**
* Generate MinIO bucket name for tenant
*/
export declare function getTenantMinioBucket(tenantDomain: string): string;
/**
* Generate SQLite WAL mode configuration
*/
export declare function getSQLiteWALConfig(): string;
/**
* Generate SQLite encryption configuration
*/
export declare function getSQLiteEncryptionConfig(encryptionKey: string): string;
/**
* Create tenant database schema (SQLite)
*/
export declare function getTenantDatabaseSchema(): string;
/**
* Generate unique document chunk ID
*/
export declare function generateDocumentChunkId(documentId: number, chunkIndex: number): string;
/**
* Parse connection string for database configuration
*/
export declare function parseConnectionString(connectionString: string): {
host?: string;
port?: number;
database?: string;
username?: string;
password?: string;
options?: Record<string, string>;
};
/**
* Escape SQL identifiers (table names, column names, etc.)
*/
export declare function escapeSQLIdentifier(identifier: string): string;
/**
* Generate database backup filename
*/
export declare function generateBackupFilename(tenantDomain: string, timestamp?: Date): string;