/** * Base codec for automatic type conversion from API responses */ export type ConverterFunction = (value: unknown) => any; export interface PropertyConfig { /** The source property name in the API response */ source?: string; /** The converter function to apply */ converter?: ConverterFunction; /** Whether this property is required */ required?: boolean; } export interface CodecConfig { [propertyName: string]: PropertyConfig | ConverterFunction; } /** * Base class for creating type-safe codecs with automatic conversion */ export declare abstract class BaseCodec { protected abstract config: CodecConfig; /** * Create an instance of T from unknown data */ create(data: unknown): T; /** * Create an array of T from unknown data */ createArray(data: unknown): T[]; /** * Normalize property config to always return PropertyConfig object */ private normalizeConfig; } /** * Create a codec instance with the given configuration */ export declare function createCodec(config: CodecConfig): BaseCodec;