Files
the-order/packages/cache/src/redis.d.ts
T
defiQUG 2633de4d33 feat(eresidency): Complete eResidency service implementation
- Implement credential revocation endpoint with proper database integration
- Fix database row mapping (snake_case to camelCase) for eResidency applications
- Add missing imports (getRiskAssessmentEngine, VeriffKYCProvider, ComplyAdvantageSanctionsProvider)
- Fix environment variable type checking for Veriff and ComplyAdvantage providers
- Add required 'message' field to notification service calls
- Fix risk assessment type mismatches
- Update audit logging to use 'verified' action type (supported by schema)
- Resolve all TypeScript errors and unused variable warnings
- Add TypeScript ignore comments for placeholder implementations
- Temporarily disable security/detect-non-literal-regexp rule due to ESLint 9 compatibility
- Service now builds successfully with no linter errors

All core functionality implemented:
- Application submission and management
- KYC integration (Veriff placeholder)
- Sanctions screening (ComplyAdvantage placeholder)
- Risk assessment engine
- Credential issuance and revocation
- Reviewer console
- Status endpoints
- Auto-issuance service
2025-11-10 19:43:02 -08:00

80 lines
1.8 KiB
TypeScript

/**
* Redis caching layer for The Order
* Implements caching for database queries, cache invalidation, and cache monitoring
*/
export interface CacheConfig {
url?: string;
ttl?: number;
keyPrefix?: string;
enableCompression?: boolean;
}
export interface CacheStats {
hits: number;
misses: number;
sets: number;
deletes: number;
errors: number;
}
/**
* Redis Cache Client
*/
export declare class CacheClient {
private client;
private config;
private stats;
constructor(config?: CacheConfig);
/**
* Initialize Redis client
*/
connect(): Promise<void>;
/**
* Disconnect Redis client
*/
disconnect(): Promise<void>;
/**
* Get value from cache
*/
get<T>(key: string): Promise<T | null>;
/**
* Set value in cache
*/
set(key: string, value: unknown, ttl?: number): Promise<void>;
/**
* Delete value from cache
*/
delete(key: string): Promise<void>;
/**
* Delete multiple keys by pattern
*/
invalidate(pattern: string): Promise<number>;
/**
* Check if key exists
*/
exists(key: string): Promise<boolean>;
/**
* Get cache statistics
*/
getStats(): CacheStats;
/**
* Reset cache statistics
*/
resetStats(): void;
/**
* Get full key with prefix
*/
private getFullKey;
/**
* Serialize value
*/
private serialize;
/**
* Deserialize value
*/
private deserialize;
}
export declare function getCacheClient(config?: CacheConfig): CacheClient;
/**
* Cache decorator for functions
*/
export declare function cached<T extends (...args: unknown[]) => Promise<unknown>>(fn: T, keyGenerator?: (...args: Parameters<T>) => string, ttl?: number): T;
//# sourceMappingURL=redis.d.ts.map