Some checks failed
CI/CD Pipeline / Integration Tests (push) Blocked by required conditions
CI/CD Pipeline / Deployment Summary (push) Blocked by required conditions
CI/CD Pipeline / Backend - Build, Test & Push (push) Failing after 2m11s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Has been cancelled
Root cause: The .gitignore had 'out/' which was ignoring ALL directories named 'out', including 'src/domain/ports/out/' which contains critical port interfaces for hexagonal architecture. Changes: - Modified .gitignore to only ignore Next.js output directories - Added all 17 missing files from src/domain/ports/out/ - audit-log.repository.ts - booking.repository.ts - cache.port.ts - carrier-connector.port.ts - carrier.repository.ts - csv-booking.repository.ts - csv-rate-loader.port.ts - email.port.ts - index.ts - notification.repository.ts - organization.repository.ts - pdf.port.ts - port.repository.ts - rate-quote.repository.ts - storage.port.ts - user.repository.ts - webhook.repository.ts This resolves all "Cannot find module '@domain/ports/out/*'" TypeScript errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
61 lines
1.2 KiB
TypeScript
61 lines
1.2 KiB
TypeScript
/**
|
|
* Cache Port
|
|
*
|
|
* Defines the interface for caching operations.
|
|
* This is a secondary port (output port) in hexagonal architecture.
|
|
*/
|
|
|
|
export const CACHE_PORT = 'CachePort';
|
|
|
|
export interface CachePort {
|
|
/**
|
|
* Get a value from cache
|
|
* Returns null if key doesn't exist
|
|
*/
|
|
get<T>(key: string): Promise<T | null>;
|
|
|
|
/**
|
|
* Set a value in cache
|
|
* @param key - Cache key
|
|
* @param value - Value to store
|
|
* @param ttlSeconds - Time to live in seconds (optional)
|
|
*/
|
|
set<T>(key: string, value: T, ttlSeconds?: number): Promise<void>;
|
|
|
|
/**
|
|
* Delete a key from cache
|
|
*/
|
|
delete(key: string): Promise<void>;
|
|
|
|
/**
|
|
* Delete multiple keys from cache
|
|
*/
|
|
deleteMany(keys: string[]): Promise<void>;
|
|
|
|
/**
|
|
* Check if a key exists in cache
|
|
*/
|
|
exists(key: string): Promise<boolean>;
|
|
|
|
/**
|
|
* Get time to live for a key (in seconds)
|
|
* Returns -2 if key doesn't exist, -1 if key has no expiration
|
|
*/
|
|
ttl(key: string): Promise<number>;
|
|
|
|
/**
|
|
* Clear all cache entries
|
|
*/
|
|
clear(): Promise<void>;
|
|
|
|
/**
|
|
* Get cache statistics
|
|
*/
|
|
getStats(): Promise<{
|
|
hits: number;
|
|
misses: number;
|
|
hitRate: number;
|
|
keyCount: number;
|
|
}>;
|
|
}
|