import * as zod_v4_core from 'zod/v4/core'; import * as zod from 'zod'; import * as SharedAdapters from '@geenius/adapters'; import { AdapterHealth as AdapterHealth$1, AdapterJsonValue as AdapterJsonValue$1, CacheAdapter as CacheAdapter$1, CacheEntry as CacheEntry$1, CacheSetOptions as CacheSetOptions$1 } from '@geenius/adapters'; /** * Health result returned by cache providers after checking backend * connectivity and basic read/write availability. * * @example * ```ts * const health: AdapterHealth = await cache.getHealth(); * ``` */ type AdapterHealth = AdapterHealth$1; /** * SDK-free key/value cache adapter contract implemented by in-process, * Redis-like, KV-backed, and app-owned cache providers. * * @example * ```ts * await cache.set("feature", true, { ttlSeconds: 60 }); * ``` */ type CacheAdapter = CacheAdapter$1; /** * Serializable cache record returned by cache conformance fixtures and * provider-boundary validators. * * @example * ```ts * const entry: CacheEntry = { key: "feature", value: true, updatedAt: new Date().toISOString() }; * ``` */ type CacheEntry = CacheEntry$1; /** * Caller-controlled write options accepted by `CacheAdapter.set()`. * * @example * ```ts * const options: CacheSetOptions = { ttlSeconds: 60 }; * ``` */ type CacheSetOptions = CacheSetOptions$1; /** * JSON-serializable value union accepted by cache writes; cache adapters * persist values across process and network boundaries so non-JSON values * (functions, classes, symbols) are rejected by `CacheAdapter.set()`. * * @example * ```ts * const value: AdapterJsonValue = { enabled: true }; * ``` */ type AdapterJsonValue = AdapterJsonValue$1; /** * Runtime validator for the common cache adapter health response. * * @example * ```ts * const health = AdapterHealthSchema.parse({ ok: true, checkedAt: new Date().toISOString() }); * ``` */ declare const AdapterHealthSchema: zod.ZodObject<{ ok: zod.ZodBoolean; checkedAt: zod.ZodString; latencyMs: zod.ZodOptional; message: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Runtime validator for JSON-serializable cache values; rejects functions, * symbols, class instances, and other non-JSON payloads at the contract * boundary before the cache backend receives them. * * @example * ```ts * const value = AdapterJsonValueSchema.parse({ enabled: true }); * ``` */ declare const AdapterJsonValueSchema: zod.ZodType>; /** * Contract-layer error for invalid cache payloads or provider-boundary * violations before a concrete cache SDK receives the request. * * @example * ```ts * throw new CacheContractError("Cache value is not JSON-compatible"); * ``` */ declare const CacheContractError: typeof SharedAdapters.CacheContractError; /** * Runtime validator for serializable cache records. * * @example * ```ts * const entry = CacheEntrySchema.parse({ key: "feature", value: true, updatedAt: new Date().toISOString() }); * ``` */ declare const CacheEntrySchema: zod.ZodObject<{ key: zod.ZodString; value: zod.ZodType>; expiresAt: zod.ZodOptional; updatedAt: zod.ZodString; }, zod_v4_core.$strip>; /** * Runtime validator for cache write options such as TTL. * * @example * ```ts * const options = CacheSetOptionsSchema.parse({ ttlSeconds: 60 }); * ``` */ declare const CacheSetOptionsSchema: zod.ZodObject<{ ttlSeconds: zod.ZodOptional; }, zod_v4_core.$strip>; export { type AdapterHealth, AdapterHealthSchema, type AdapterJsonValue, AdapterJsonValueSchema, type CacheAdapter, CacheContractError, type CacheEntry, CacheEntrySchema, type CacheSetOptions, CacheSetOptionsSchema };