/** * Cache Types */ /** * Cache service configuration */ export interface ICacheServiceConfig { workspace_id: string; public_key: string; user_id: string; token: string; env_type: string; access_key?: string; /** Workspace private key for encrypting log data. When set, LogsService encrypts log payloads. */ workspace_private_key?: string; default_product?: string; default_env?: string; } /** * Cache value entry */ export interface ICacheValue { _id?: string; key: string; value: string; cache_tag: string; product_tag: string; component_tag: string; component_type: string; expiry?: Date; createdAt?: Date; updatedAt?: Date; } /** * Options for fetching paginated cache values */ export interface IFetchCacheValuesOptions { product: string; cache: string; env?: string; page?: number; limit?: number; expiryFilter?: 'all' | 'expiring' | 'permanent' | 'expired'; } /** * Result for paginated cache values */ export interface IFetchCacheValuesResult { values: ICacheValue[]; total: number; page: number; limit: number; totalPages: number; } /** * Options for fetching cache dashboard */ export interface IFetchCacheDashboardOptions { product: string; cache: string; env?: string; } /** * Cache dashboard metrics */ export interface ICacheDashboardMetrics { totalValues: number; activeValues: number; expiredValues: number; totalSize: number; } /** * Options for clearing a cache value */ export interface IClearCacheValueOptions { key: string; } /** * Options for clearing multiple cache values */ export interface IClearCacheValuesOptions { product: string; cache: string; env?: string; } /** * Result for clearing multiple cache values */ export interface IClearCacheValuesResult { cleared: number; } export type IDeleteCacheValueOptions = IClearCacheValueOptions; export type IDeleteCacheValuesOptions = IClearCacheValuesOptions; export type IDeleteCacheValuesResult = IClearCacheValuesResult; /** * Options for setting a cache value */ export interface ISetCacheValueOptions { product: string; cache: string; key: string; value: string; componentTag?: string; componentType?: string; expiry?: Date; env?: string; } /** * Options for getting a cache value */ export interface IGetCacheValueOptions { key: string; env?: string; }